This is a question on methodology. But I have 4d temperature and salinity gridded data (time, depth, lat and lon). The time is in monthly time steps. How would I get the annual harmonics of temperature and salinity using a periodicity of 12 months:
The equation is:
$$ Var(t,z,y,x) = A (z,y,x) * \cos [ (2 \pi t/P + \phi(z,y,x)] $$
Where $A$ is the amplitudes of the annual component, where $var$ is either temp or salinity. $\phi$ is the phase angle which determine the time when the maximum of the annual harmonic occurs. And $t$ varies from 0 - n months (however long the time series is).
We can isolate $A(z,y,x)$ just with algebra, but the issue is finding the phase angle where the maximum of the annual harmonic occurs.
Do you you need to take a fourier transform of monthly means (January - December), or do you take the FT of the entire time series but just look at the power spectrum at 12 months... I am using Python, and taking the fourier transform is no problem. I just don't know how to treat the data to obtain the phase angle where the maximum of the annual harmonic occurs. What might be the steps to find the annual harmonic amplitude given 4D temp and salinity (time in months, depth, lat and lon)?