






      module mo_lu_solve

      private
      public :: lu_slv

      contains

      subroutine lu_slv01( lu, b )


      use shr_kind_mod, only : r8 => shr_kind_r8

      implicit none

!-----------------------------------------------------------------------
! ... Dummy args
!-----------------------------------------------------------------------
      real(r8), intent(in) :: lu(:)
      real(r8), intent(inout) :: b(:)

!-----------------------------------------------------------------------
! ... Local variables
!-----------------------------------------------------------------------

!-----------------------------------------------------------------------
! ... solve L * y = b
!-----------------------------------------------------------------------
!-----------------------------------------------------------------------
! ... Solve U * x = y
!-----------------------------------------------------------------------
         b(54) = b(54) * lu(56)
         b(53) = b(53) * lu(55)
         b(52) = b(52) * lu(54)
         b(51) = b(51) * lu(53)
         b(50) = b(50) * lu(52)
         b(49) = b(49) * lu(51)
         b(48) = b(48) * lu(50)
         b(47) = b(47) * lu(49)
         b(46) = b(46) * lu(48)
         b(45) = b(45) * lu(47)
         b(44) = b(44) * lu(46)
         b(43) = b(43) * lu(45)
         b(42) = b(42) * lu(44)
         b(41) = b(41) * lu(43)
         b(40) = b(40) * lu(42)
         b(39) = b(39) * lu(41)
         b(38) = b(38) * lu(40)
         b(37) = b(37) * lu(39)
         b(36) = b(36) * lu(38)
         b(35) = b(35) * lu(37)
         b(34) = b(34) * lu(36)
         b(33) = b(33) * lu(35)
         b(32) = b(32) * lu(34)
         b(31) = b(31) * lu(33)
         b(30) = b(30) * lu(32)
         b(29) = b(29) * lu(31)
         b(28) = b(28) * lu(30)
         b(27) = b(27) * lu(29)
         b(26) = b(26) * lu(28)
         b(25) = b(25) * lu(27)
         b(24) = b(24) * lu(26)
         b(23) = b(23) * lu(25)
         b(22) = b(22) * lu(24)
         b(21) = b(21) * lu(23)
         b(20) = b(20) * lu(22)
         b(19) = b(19) * lu(21)
         b(18) = b(18) * lu(20)
         b(17) = b(17) * lu(19)
         b(16) = b(16) * lu(18)
         b(15) = b(15) * lu(17)
         b(14) = b(14) * lu(16)
         b(13) = b(13) * lu(15)
         b(12) = b(12) * lu(14)
         b(11) = b(11) * lu(13)
         b(10) = b(10) * lu(12)
         b(9) = b(9) * lu(11)
         b(8) = b(8) * lu(10)
         b(7) = b(7) * lu(9)
         b(6) = b(6) * lu(8)
         b(5) = b(5) * lu(7)
         b(4) = b(4) * lu(6)
         b(3) = b(3) - lu(5) * b(4)
         b(3) = b(3) * lu(4)
         b(2) = b(2) - lu(3) * b(3)
         b(2) = b(2) * lu(2)
         b(1) = b(1) * lu(1)
      end subroutine lu_slv01
      subroutine lu_slv( lu, b )
      use shr_kind_mod, only : r8 => shr_kind_r8
      implicit none
!-----------------------------------------------------------------------
! ... Dummy args
!-----------------------------------------------------------------------
      real(r8), intent(in) :: lu(:)
      real(r8), intent(inout) :: b(:)
      call lu_slv01( lu, b )
      end subroutine lu_slv
      end module mo_lu_solve
