[Thread Prev][Thread Next][Index]
nested conditional statements
Greetings,
Hopefully someone can help me out with this simple question.
I have data with 14610 time steps and I want to pick out certain cases
according to the value of the derivative of an index AO.
Here's what I do:
let didt=ao[d=1,l=@ddc]
let threshold=.25
repeat/l=1:14610 if `didt gt threshold` then
save/file=case.slope.25.nc/append utend
and this works fine.
What I want to do is similar but I want the derivative to be over 2 days
(or more).
In psuedo code, something like:
For l=1:14610:1
if didt(l) > threshold
if didt(l+1) > threshold
then write the data out for l
else continue through the loop.
I hope this makes sense.
If that's not clear on what I'm asking, another example where similar
ability would make life easier is a case study looking for when the index
crosses some threshold.
something like:
for l=1:14610:1
if ao(l) > threshold
if ao(l-1) < threshold
then write the data at l
else continue through the loop.
I've wanted to be able to do similar things with ferret several times but
have never figured out how to do it. Any help is appreciated.
Thanks as always,
--Brent
--
Brent A. McDaniel
Dept of Earth and Atmospheric Sciences
Georgia Institute of Technology
Atlanta, Ga. USA
[Thread Prev][Thread Next][Index]
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement