Analysis of Discrete Adjoints for Upwind Numerical Schemes