[Thread Prev][Thread Next][Index]
Re: [ferret_users] Counting of ElNino & LaNina Events
Hi,
I think this can be done using the @EVNT transformation which locates
when a variable crosses a threshhold. You also need a mask that detects
when you enter the required period
Here's an example
! sine wave but I'll force value at i=71 below 0.5 to break the
! "El Nino"early
let xx = I[I=1:100]
let index = IF ( xx NE 71 ) THEN SIN((xx-1)/5) ELSE 0.4
! El nino (>0.5) begining and end detection all values during the same
! El nino period are the same as are those outside
let threshold = index[I=1:100@EVNT:0.5]
! Mask for beginning of El Nino
let begintest = IF ( index GE 0.5 AND index[I=@SHF:-1] LT 0.5 ) THEN 1
! Might start in El nino so possibly add index 1 into mask
let begin = if ( xx eq 1 and `index[i=1] GE 0.5` ) then 1 else begintest
! Now check if we have the same value 5 months later.
! We are only interested at the beginning point of EN so apply a mask
let elnino = IF ( threshold EQ threshold[I=@SHF:6] AND begin ) THEN 1
!we should have values of 1 for the start of any 6 month period
list index,threshold, begin, elnino
! See that the broken El nino has been omitted
! How many El ninos? Add up the elnino value
list elnino[i=@sum]
VARIABLE : IF ( THRESHOLD EQ THRESHOLD[I=@SHF:6] AND
BEGIN ) THEN 1
X : 0.5 to 100.5 (summed)
2.000
Cheers,
Russ
On Sun, 2013-03-31 at 23:09 +1100, Star Physicist wrote:
> Dear FERRET users,
>
> I wanted to calculate no of Elnino and LaNina events using SST monthly
> data. My data ranges from jan1990 to dec1999 (10 years, 120 months). I
> need go through following steps in FERRET
>
> 1) Calculate spatial averages over the NINO3.4 region of SST
> 2) Calculate monthly means of Jan, Feb ... Dec.
> 3) Calculate Anomaly =SST-corresponding monthly means
> 4 Normalize it by the corresponding Standard deviation (This is my
> NINO3.4 index)
>
> Now at the end I have to count no of ElNino and LaNina years in this
> total period (condition is that if continuous 6 months have threshold
> valuse of NiNo3.4 index greater or equal +0.4; I will count it as
> ElNino and If its value is less or equal to -0.4; it will be counted
> as LaNina ).
>
> How can I do this counting over calculated Nino3.4 index
>
>
[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce /
NOAA /
OAR /
PMEL /
Ferret
Privacy Policy | Disclaimer | Accessibility Statement