```

SUBROUTINE SOLVE1( B, CBAND, FISOT, IHOM, IPVT, LL, MI9M2, MXCMU, 2,2
&                   NCOL, NCUT, NN, NNLYRI, NSTR )

c        Construct right-hand side vector B for isotropic incidence
c        (only) on either top or bottom boundary and solve system
c        of equations obtained from the boundary conditions and the
c        continuity-of-intensity-at-layer-interface equations
c
c
c     I N P U T      V A R I A B L E S:
c
c       CBAND    :  Left-hand side matrix of banded linear system
c                   Eq. SC(5), scaled by Eq. SC(12); assumed already
c                   in LU-decomposed form, ready for LINPACK solver
c
c       IHOM     :  Direction of illumination flag (1, top; 2, bottom)
c
c       NCOL     :  Number of columns in CBAND
c
c       NN       :  Order of double-Gauss quadrature (NSTR/2)
c
c       (remainder are DISORT input variables)
c
c
c    O U T P U T     V A R I A B L E S:
c
c       B        :  Right-hand side vector of Eq. SC(5) going into
c                   SGBSL; returns as solution vector of Eq.
c                   SC(12), constants of integration without
c                   exponential term
c
c       LL      :   permanent storage for B, but re-ordered
c
c
c    I N T E R N A L    V A R I A B L E S:
c
c       IPVT     :  INTEGER vector of pivot indices
c       NCD      :  Number of diagonals below or above main diagonal
c
c   Called by- ALBTRN
c   Calls- ZEROIT, ERRMSG, SGBSL
c +-------------------------------------------------------------------+

c     .. Scalar Arguments ..

INTEGER   IHOM, MI9M2, MXCMU, NCOL, NCUT, NN, NNLYRI, NSTR
REAL      FISOT
c     ..
c     .. Array Arguments ..

INTEGER   IPVT( NNLYRI )
REAL      B( NNLYRI ), CBAND( MI9M2, NNLYRI ), LL( MXCMU, * )
c     ..
c     .. Local Scalars ..

INTEGER   I, IPNT, IQ, LC, NCD
c     ..
c     .. External Subroutines ..

EXTERNAL  SGBSL, ZEROIT
c     ..

CALL ZEROIT( B, NNLYRI )

IF( IHOM.EQ.1 ) THEN
c                             ** Because there are no beam or emission
c                             ** sources, remainder of B array is zero
DO 10 I = 1, NN
B( I )             = FISOT
B( NCOL - NN + I ) = 0.0
10    CONTINUE

ELSE IF( IHOM.EQ.2 ) THEN

DO 20 I = 1, NN
B( I )             = 0.0
B( NCOL - NN + I ) = FISOT
20    CONTINUE

END IF

NCD  = 3*NN - 1
CALL SGBSL( CBAND, MI9M2, NCOL, NCD, NCD, IPVT, B, 0 )

DO 40 LC = 1, NCUT

IPNT  = LC*NSTR - NN

DO 30 IQ = 1, NN
LL( NN + 1 - IQ, LC ) = B( IPNT + 1 - IQ )
LL( IQ + NN,     LC ) = B( IQ + IPNT )
30    CONTINUE

40 CONTINUE

RETURN
END
```