Force on a dam with atmospheric pressure For this problem,

So they assume that the pressure at the top of the dam is zero instead of 1 atm. Therefore I wanted to try to take atmospheric pressure into account,

Do you please know how to get P_0A/2 so that the P_0A/2 terms can cancel to get their hydrostatic force? I assume that the atmospheric pressure is the same at the top and bottom since the height of the dam is negligible to the scale of the atmosphere.
Thanks for any help!
 A: First of all, I wouldn't suggest using an average of forces, as they can be wrong in many cases. Calculus way though it's hard if correctly done is a very concise way to solve problems.
Let us take a strip of the dam of breadth $dy$ and length $l$ and y depth (from the surface). So force acting would be:
$$dF=(\rho gy)(ldy)$$
Integrating: $$F=\frac{\rho g hA}{2}$$
Interesting to note that I did not take $P_{atm}$ is because both water and dam surface is open to the atmosphere, so they are automatically canceled.
Edit:
Taking, $P_{atm}$ into equations. Firstly we see that P is acting on water surface also so,
$$F=\frac{\rho g hA}{2}+P_0A$$
Now also P acts on dam's other side on opposite direction, which is:
$$F_1=P_0 A$$
$$F_{net}=F-F_1$$
EDIt-2
So lets say our water reservoir of dam is open to atomosphere. We need to calculate pressure from atomosphere only and corresponding force on dam.
$$dF_{atomosphere}=(P_0)(ldx)$$
Note that $P_o$ is not function of depth like we did for water. Integrating:
$$F_{atomosphere}=P_0 (lx)$$
$$F_{atomosphere}=P_0 (A)$$
