!-------------------------------------- LICENCE BEGIN ------------------------------------
!Environment Canada - Atmospheric Science and Technology License/Disclaimer,
!                     version 3; Last Modified: May 7, 2008.
!This is free but copyrighted software; you can use/redistribute/modify it under the terms
!of the Environment Canada - Atmospheric Science and Technology License/Disclaimer
!version 3 or (at your option) any later version that should be found at:
!http://collaboration.cmc.ec.gc.ca/science/rpn.comm/license.html
!
!This software 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 above mentioned License/Disclaimer for more details.
!You should have received a copy of the License/Disclaimer along with this software;
!if not, you can write to: EC-RPN COMM Group, 2121 TransCanada, suite 500, Dorval (Quebec),
!CANADA, H9P 1J3; or send e-mail to service.rpn@ec.gc.ca
!-------------------------------------- LICENCE END --------------------------------------
!

      SUBROUTINE  DELT  ( DEL, SCOS ) 1
***subroutine     DELT
*
*auteur           Louis Garand  - rpn - dorval
*
*revision 001     Jacques Halle - ddo - dorval - 421-4660
*                                 fev 1991
*                 adapter au systeme operationel GOES.
*
*REVISION 002     JACQUES HALLE - DDO - DORVAL - 421-4660
*                                 Decembre 1995
*                 Generaliser pour toutes les plateformes satellitaires.
*
*langage          fortran 5
*
*objet            ce sous-programme calcule un facteur de correction
*                 pour l'albedo a partir du cosinus de l'angle solaire. 
*
*appel            CALL DELT  ( DEL, SCOS )
*
*arguments        del   - output - facteur de correction
*                 scos  - input  - cosinus de l'angle solaire
**
      implicit  none
c
      integer  i1, i2
c
      real  del, scos, pi, fac, x1, x2, g1, g2, a, b
      real  drcld
      real  S(11)
c
      external  drcld, solu
c 
      DATA  S / 00.00, 18.19, 31.79, 41.41, 49.46, 56.63, 
     X          63.26, 69.51, 75.52, 81.37, 87.13        /
c 
      PI  = 3.14159265 
      FAC = PI/180. 
      I1  = 12 -( SCOS+0.05)*10. 
      I2  = I1+1 
      I1  = MIN0(I1,11)
      I2  = MIN0(I2,11)
      X1  = COS ( S(I1)*FAC )  
      X2  = COS(S(I2)*FAC) 
      G1  = DRCLD(I1)
      G2  = DRCLD(I2)
c
      CALL  SOLU ( G1, X1, G2 ,X2, A, B )
      DEL = A*SCOS + B
c
      RETURN
      END