Known bugs in SBDART Version 2.4:

------------------------------------------------------------------------

* Bug: Incorrect Fresnel reflection coefficient used in ocean water
  brdf.

  Symptom: Affects output only for ISALB=-7 or 7.  The error has only
  a slight effect on water reflectivity in the visible and near-IR
  spectral region, but will cause a large overestimate of surface
  reflectance in the thermal infrared.

  Remedy: In subroutine fresnel, the reflection coefficient for the
  parallel electric field, RL2, should be

              rl2=((b1-u)**2+(b2-v)**2)/((b1+u)**2+(b2+v)**2)
  instead of 
              rl2=((b1-u)**2+(b2+v)**2)/((b1+u)**2+(b2-v)**2)

------------------------------------------------------------------------

* Bug: albedo.dat file not read when ISALB=-1.

  Symptom: divide by zero error when ISALB=-1.

  Remedy: Remove the following lines from near the beginning of 
  subroutine suralb:

      if(isalb.eq.-1) then
        return
      endif

------------------------------------------------------------------------

* Bug: unphysical radiance profile is produced with ISALB=7 (ocean brdf)
  when a large number of radiation streams is used (NSTR > 24).

  Symptom: For a viewing zenith = 0 (normal reflection from the surface) 
  radiance at different viewing azimuth angles should be constant, but
  code output yields large variations (~factor of 2) over azimuth.

  Remedy: A fix has been suggested by user Stephen Hunter:

    "This is a problem in DISORT, and applies to any non-isotropic
    lower boundary (it's often not noticeable if the incident light at
    the surface is mostly diffuse).  The parameter NMUG is set to 50
    at line 3689 of disort.f in the subroutine SURFAC.  This is used
    as the number of quadrature points for calculating the Fourier
    coefficients (BDR and RMU) for the BRDF at each viewing zenith
    angle.  If NSTR>25 then it has less than twice as many 'data
    points' as the number of coefficients it is calculating, so the
    higher order coefficients are incorrect.  You can use larger
    numbers of streams with a non-isotropic BRDF as long as you first
    set NMUG >= 2*(NSTR+1)."

------------------------------------------------------------------------

* Bug: incorrect brdf diagnostic output for idb(8)=2

  Symptom: small errors in diagnostic print out of brdf

  Remedy: in subroutine bdrefchk change the call to bdref from

          bdrf(i,j)=bdref(wv1,wv2,amu0,cos(dtor*uzen(j)),dtor*phi(i))

  to

          bdrf(i,j)=bdref(wv1,wv2,cos(dtor*uzen(j)),amu0,dtor*phi(i))

------------------------------------------------------------------------

* Bug: viewing angles UZEN and PHI are not automatically generated when
  when idb(8)=2.

  Symtom: Viewing angles UZEN and PHI may be specified in three ways
  1) provide a comma separated list of each viewing angle
  2) set NPHI and NZEN and give the limits of PHI and UZEN
  3) don't specify anything and let the code come up with a default set
     of viewing angles.
  In SBDART vesion 2.4 the creation of viewing angles in case 2 and 3 is 
  only done if a radiance computation is specified.  Auto generation
  of UZEN and PHI does not take place if idb(8)=2 and IOUT is not set
  to one of the radiance outputs.

  Remedy: setting IOUT=20 causes the code to believe it is in radiance mode.
  This will cause the viewing angles to be generated automatically.  

------------------------------------------------------------------------

* Bug: aerosol property interpolation when iaer=-1

  Symptom: aerosol properties read from aerosol.dat are not interpolated 
  correctly when starting wavelength (wlinf in input file) exactly matches
  the starting wavelength of aerosol.dat.

  Remedy: Make sure initial wavelength in aerosol.dat is not exactly equal
  to wlinf.  The bug may be removed completely by replacing line 1639 of 
  file tauaero.f as follows:

  original:         do while (wl.gt.maxval(wlbaer))

  corrected:        do while (wl.ge.maxval(wlbaer))

------------------------------------------------------------------------

* Bug: Input documentation for NOSCT input parameter is incorrect

  Symptom: The effects of NOSCT=1 and NOSCT=3 are reversed in the 
  documentation.  Also, the documentation incorrectly states that aerosols
  specified with IAER=5 are not affected by NOSCT.  In fact, IAER=5 aerosols 
  are affected, but IAER=-1 aerosols are not affected.
  

  Remedy: in rt.doc replace description of NOSCT in rt.doc with this:

  NOSCT:        aerosol scattering mode used for boundary layer aerosols:

                0    normal scattering and absorption treatment

                1    AOD'=AOD*(1-SSA)
                     SSA'=0

                2    SSA'=0

                3    AOD'=AOD*(1-SSA*ASYM)
                     SSA'=0
                
                where AOD=aerosol optical depth
                      SSA=single scattering albedo, and 
                      ASYM=asymmetry factor

                NOSCT does not affect aerosol properties read from 
                aerosol.dat (IAER=-1) or the stratospheric aerosol models 
 
------------------------------------------------------------------------

* Bug: code crashes when using cloud parameters read from usrcld.dat

  Symptom: crash only occurs when the cloud contains a frozen water component

  Remedy: recompile SBDART after making this change in subroutine usrcloud 
          of taucloud.f replace line

      integer, parameter :: rhoice=.917 ! the bulk density of ice (g/cm3)

                with

      real, parameter :: rhoice=.917 ! the bulk density of ice (g/cm3)

------------------------------------------------------------------------

* Bug: Input documentation for TCLOUD input parameter is incorrect
  
  Symptom: Description of TCLOUD falsely states that Mie scattering
           database for ice droplets is limited to a single value of
           effective radius.  In fact, the ice database covers the same
           range of effective radius (2 to 128 microns) as the water
           droplet database.
  
  Remedy: Download corrected version of rt.doc

------------------------------------------------------------------------

* Bug: Incorrect functional form for the Ross-sparse Li-thick BRDF model
 
  Symptom: Incorrect values of surface BRDF are generated when abs(isalb)=9

  Remedy: 

       replace this statement near end of subroutine rtlsbdrf

      f2=f2-1./cos(vzap)+.5*(1.+cossp)/(cos(szap)*cos(vzap))

with:

      f2=f2-secsum+.5*(1.+cossp)/(cos(szap)*cos(vzap))

------------------------------------------------------------------------

* Bug: no diagnostic print out with idb(2)=1.

  Remedy: Change description of idb(2) option in rt.doc.  Documentation
          should read as follows:

             idb(2) prints relative humidity and water vapor density.  Debug
                    print out is not produced if RHCLD is not set, TCLOUD=0
                    or KDIST is negative.

 
------------------------------------------------------------------------

* Bug: Variables WEQ and WFULL in STDOUT1 are not declared properly.  

  Symptoms: No symptoms will be noted for compilers that retain variable 
            values between subroutine calls by default.  If values are not
            saved, the calculated values of equavalent width in STDOUT1 will
            be incorrect.  Some compilers will produce a run-time error, 
            complaining that WEQ and WFULL are used before being defined.  

  Remedy: change declaration statement at the  beginning of STDOUT1 as follows:

         original:

      real(kr) :: rfldir(*),rfldn(*),flup(*),phi(*),uzen(*),z(*),
     &     uur(nstrms,maxulv,nstrms), dwt, wt, dwl, ff, wl, 
     &     dwx, weq, wfull

         corrected:

      real(kr) :: rfldir(*),rfldn(*),flup(*),phi(*),uzen(*),z(*),
     &     uur(nstrms,maxulv,nstrms), dwt, wt, dwl, ff, wl, 
     &     dwx

      real(kr), save :: weq, wfull

* Bug: on on some compilers spurious results are produced when iaer=0

  remedy: initialize value of dtauab in tauaero.f

         insert this line at tauaero.f line 1245

        dtauab(1:nz)=0.