Hi,
As an alternative you could use the @SMX or @SMN "smoothers". These return the maximum/minimum values over an interval. If your threshold is exceeded by the minimum (say) you know all other values are greater and the event is triggered.
To get the middle point of a series of 5 points exceeding 0.5 degree anomaly
let is_el_nino = if sst_anom[l=@smn:5] gt 0.5 then 1 else 0
let is_la_nina = if sst_anom[l=@smx:5] lt -0.5 then 1 else 0
You can combine these definitions with the @EVNT:0.5 transformation to detect the begining and end of the episodes if they are longer than 5 (odd for start, even for end). I'd check the start and end of these time series to make sure that you aren't starting/ending
with only 3/4 triggering points in the smoothing window.
Russ
From: owner-ferret_users@xxxxxxxx <owner-ferret_users@xxxxxxxx> on behalf of Ryo Furue <furue@xxxxxxxxxx>
Sent: Monday, 17 February 2020 1:40 PM To: Akash. S <akash013akash@xxxxxxxxx> Cc: ferret users <ferret_users@xxxxxxxx> Subject: Re: [ferret_users] Nino3.4 estimation Hi Akash,
On Sat, Feb 15, 2020 at 7:28 PM Akash. S <akash013akash@xxxxxxxxx> wrote:
Since I don't know the details of your problem, I just outline one strategy. It seems that you can achieve your goal by
For the sum, the boxcar smoother (@SBX) over L may be convenient:
Although it's called a "smoother", it just takes a simple average over an interval, so that you can use this relation to infer the sum
Otherwise, you can use the @SUM operator over an interval of L.
Hope this helps.
Ryo
|