[Thread Prev][Thread Next][Index]

Re: [ferret_users] active and break of monsoon

Hi Ansley,

With the help of Roy, I now have desired mask which is similar to below.

let mask1 = if p[l=@shf:-2] gt 1 AND p[l=@shf:-1]  gt 1 AND p gt 1 then 1 else 0

let mask2 = if p[l=@shf:-1] gt 1 AND p gt 1 AND p[l=@shf:1] gt 1 then 1 else 0
let mask3 = if p > gt AND p[l=@shf:1] gt 1 AND p[l=@shf:2] gt 1 then 1 else 0

let mask = if mask1 + mask2 + mask3 > 0 then 1

Also, the method described in FAQ work fine for masking selected months.

Now, I want to save just valid data /time steps; how can I do that? compressL places all valid data at the begining and the undefined data points then after but the time is in abstract axis so its not preserving the date of valid data points. I could not figure out other way. 
Many thanks,


From: Ansley Manke <ansley.b.manke@xxxxxxxx>
To: jagadish karmacharya <j_karmacharya@xxxxxxxxx>
Cc: users Group Ferret <oar.pmel.ferret_users@xxxxxxxx>
Sent: Monday, March 12, 2012 11:17 PM
Subject: Re: [ferret_users] active and break of monsoon

Hi Jagadish,
There is a useful FAQ about creating a seasonal mask, which I think may be what you need. 


On 3/12/2012 8:07 AM, jagadish karmacharya wrote:

I have a multiyear daily time series of precipitation data and I am strugling to create composite of active (and break) monsoon period.

I think what I need is a mask along the time axis that is based on a criteria (say area averaged precipitation >1 for 3 or more successive days). I can then apply the mask to create active phase composites for precipitation and other variables. Let me illustrate with an example: say daily area average precip are:

01-JUL-2007:  0.2.
02-JUL-2007:  0.8
03-JUL-2007:  1.2
04-JUL-2007:  2.1
05-JUL-2007:  2.0
06-JUL-2007:  1.5
07-JUL-2007:  1.1
08-JUL-2007:  0.4
09-JUL-2007:  0.1
10-JUL-2007:  0.6

From above definition definition: the active phase is from 3 - 7 Jul and what I want is a mask with 1 on those dates and undefined for other dates.

Other wish list are: to plot active days; get a list of just the valid days and finally save the mask for later use on other variables.

This is how far I have gone: For above example, I am able to creat a mask with 1's from 3-5 Jul but not able to extend it to 7 Jul.

let atv=if precip GT 1 AND precip[l=@SHF:1] GT 1 AND precip[l=@SHF:2] GT 1 then 1

list atv

01-JUL-2007:  .....
02-JUL-2007:  .....
03-JUL-2007:  1.0
04-JUL-2007:  1.0
05-JUL-2007:  1.0
06-JUL-2007:  ....
07-JUL-2007:  ....
08-JUL-2007:  ....
09-JUL-2007:  ....
10-JUL-2007:  .....

What do I modify if active period is to be valid only between 1 jul to 31 August

Many thanks in advance.


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

Privacy Policy | Disclaimer | Accessibility Statement