anchor.diff:          tempis = 0.99975*tempis68 + 0.0002
   !       Note: parts (a) and (c) above are tiny corrections;
   !             part  (b) is a big correction for deep waters (but zero at surface)
  -     ELSEIF (trim(optT) == 'Tinsitu') THEN
  +     ELSEIF (trim(optT) == 'Tinsitu' .OR. trim(optT) == 'tinsitu') THEN
   !       When optT = 'Tinsitu', tempis is input & output (no tempot needed)
           tempis = temp(i)
        ELSE
           PRINT *,"optT must be either 'Tpot' or 'Tinsitu'"
  +        PRINT *,"you specified optT =", trim(optT) 
           STOP
        ENDIF
   
  
positive.code:         invtk=1.0d0/tk
          dlogtk=LOG(tk)
  
  !       Pressure effect (prb is in bars)
          prb = DBLE(p) / 10.0d0
  
  !       Salinity and simply related values
  
negative.code:         Kf(i) = Kf_0p * EXP(lnkpok0(6)) !Pressure correction (on Free scale)
          Kf(i) = Kf(i)/total2free        !Convert back from Free to Total scale
  
  !       Convert between seawater and total scales
          free2SWS  = 1.d0 + St(i)/Ks(i) + Ft(i)/(Kf(i)*total2free)  ! using Kf on free scale
          total2SWS = total2free * free2SWS                          ! KSWS = Ktotal*total2SWS
          SWS2total = 1.d0 / total2SWS
  