[Thread Prev][Thread Next][Index]

Re: [ferret_users] computation of derivatives



Dear Ryo
G'day

Thank you so much for making me clear about the functions. Hopefully, it will be sorted :)

Cheers, Saurabh

On Mon, Dec 19, 2022 at 3:19 PM Ryo Furue <furue@xxxxxxxxxx> wrote:
Saurabh,

For simplicity, let's forget about x and y because you are applying exactly the same calculation at each (x,y) point.

I am attaching an image in which there are four terms that I am trying to compute. 
term-1 = d(theta)/d(time) on z depth
term-2 = d(theta)/d(time) on n depth
term-3 = d(z)/d(time) on n depth
term-4 = d(theta)/d(z)

You can calculate terms 1 and 4 on the original z-t grid on Ferret.  Between terms 2 and 3, I think term 3 would be easier.

You first 1) calculate the depth of neutral surface, z(n, t), using ZAXREPLACE, 2) calculate ∂z/∂t on the n-t grid, and 3) map this back onto the z-t grid using ZAXREPLACE.

In this way, you'll get terms 1, 3 & 4 on the original z-t grid.  Term 2 is just the difference.
 

In my understanding...
term-1 is the differentiation of theta w.r.t. time and can be calculated as theta[l=@ddc]. However, here I am having confusion that whether the term-1 is a differentiation or linear trend.

or shall I compute the derivatives w.r.t. time and then compute the slope?

If you want a long-term trend and if you have a long-enough timeseries, simply taking the temporal average of the terms would suffice, I think.  I mean, you just calculate the terms at each time step and average them later.

Note that, if a = b + c*d,

average(a) = average(b) + average(c * d)

or

average(a) ≈ average(b) + average(c)*average(d) + average(c' d'),

where c' = c - average(c) and d' = d - average(d).  Which form you want depends on how you interpret your results.

Cheers,

Ryo


[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement