docs: def estimated_inversion_strength(T0,T700):
      '''Compute the Estimated Inversion Strength or EIS,
      following Wood and Bretherton (2006, J. Climate)
  
      Inputs: T0 is surface temp in Kelvin
             T700 is air temperature at 700 hPa in Kelvin
  
      Output: EIS in Kelvin
  
      EIS is a normalized measure of lower tropospheric stability acccounting for
      temperature-dependence of the moist adiabat.
      '''
      # Interpolate to 850 hPa
      T850 = (T0+T700)/2.;
      # Assume 80% relative humidity to compute LCL, appropriate for marine boundary layer
      LCL = lifting_condensation_level(T0, 0.8)
      # Lower Tropospheric Stability (theta700 - theta0)
      LTS = potential_temperature(T700, 700) - T0
      #  Gammam  = -dtheta/dz is the rate of potential temperature decrease along the moist adiabat
      #  in K / m
      Gammam = (g/cp*(1.0 - (1.0 + Lhvap*qsat(T850,850) / Rd / T850) /
               (1.0 + Lhvap**2 * qsat(T850,850)/ cp/Rv/T850**2)))
      #  Assume exponential decrease of pressure with scale height given by surface temperature
      z700 = (Rd*T0/g)*log(1000./700.)
      return LTS - Gammam*(z700 - LCL)