function k1 = ozone2_k1 ( t )

%*****************************************************************************80
%
%% ozone2_k1 evaluates rate coefficient k1 for ozone2_ode().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    26 January 2021
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real T: the current time, in seconds from sunrise.
%
%  Output:
%
%    real K1: the rate coefficient.
%
  t_hours = t / 3600.0;
  hour = mod ( t_hours, 24.0 );

  if ( 4.0 <= hour & hour <= 20.0 )
    t_bar = t_hours - 24 * floor ( t_hours / 24.0 );
    s = ( sin ( pi * ( t_bar - 4.0 ) / 16.0 ) ) ^ 0.2;
    k1 = 1.0E-05 * exp ( 7.0 * s );
  else
    k1 = 1.0E-40;
  end

  return
end

