function svd_snowfall ( )

%*****************************************************************************80
%
%% svd_snowfall() analyzes the snowfall data.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    28 December 2020
%
%  Author:
%
%    John Burkardt
%

%
%  Compute SVD.
%
  [ u, s, v ] = svd ( x );

  if ( false )
    clf ( );
    sdiag = diag ( s );
    plot ( 1:8, sdiag, 'b.-', 'Linewidth', 3, 'MarkerSize', 50 );
    title ( 'Singular values of SNOWFALL matrix' );
    grid ( 'on' );
  end

  if ( false )
    sdiag
    importance(1) = sdiag(1)^2 / sum ( sdiag.^2 )
    importance(2) = sdiag(2)^2 / sum ( sdiag.^2 )
    importance(3) = sdiag(3)^2 / sum ( sdiag.^2 )
  end
%
%  V contains the modes for variation over years in a fixed month.
%
  year = 1890:2012;
  vs = r8col_normalize_li ( 123, 123, v );

%
%  Try to fix these plots by reversing the row ordering of v.
%
  i = 123:-1:1;
  j = 1:123;
  vs(i,:) = vs(j,:);

  if ( true )
    clf ( );
    scatter ( year, vs(:,1), 'filled' );
    h = lsline
    set ( h, 'Linewidth', 3 );
    set ( h, 'Color', [0,0,0] );
    grid ( 'on' );
    xlabel ( '<--Year-->' );
    title ( 'V Mode #1' );
  end

  if ( false )
    clf ( );
    scatter ( year, vs(:,2), 'filled' );
    h = lsline
    set ( h, 'Linewidth', 3 );
    set ( h, 'Color', [0,0,0] );
    grid ( 'on' );
    xlabel ( '<--Year-->' );
    title ( 'V Mode #2' );
  end

  if ( false )
    clf ( );
    scatter ( year, vs(:,3), 'filled' );
    h = lsline
    set ( h, 'Linewidth', 3 );
    set ( h, 'Color', [0,0,0] );
    grid ( 'on' );
    xlabel ( '<--Year-->' );
    title ( 'V Mode #3' );
  end

  if ( false )
    clf ( );
    scatter ( year, vs(:,4), 'filled' );
    h = lsline
    set ( h, 'Linewidth', 3 );
    set ( h, 'Color', [0,0,0] );
    grid ( 'on' );
    xlabel ( '<--Year-->' );
    title ( 'V Mode #4' );
  end

  return
end
