XX = np.sin(45 * np.pi / 180) need to be squared
And verify whole formula:
Fofonoff 1983, page 28 (https://repository.oceanbestpractices.org/bitstream/handle/11329/109/059832eb.pdf?sequence=1&isAllowed=y)
GR = 9.780318 * (1.0 + (5.2788e-3 + 2.36e-5 * XX) * XX) + 1.092e-6 * D
P = D / GR