[Thread Prev][Thread Next][Index]

Re: [ferret_users] defining time axis



Thank you so much, it solves the issue :)
Reg
Arijeet




On 1/6/17, Ansley C. Manke <ansley.b.manke@xxxxxxxx> wrote:
> Hi Arijeet,
>
> To define a mask that picks out only the April months from each year you
> would want this, wouldn't you?
>
>    let mask_april = if yr_months EQ 4 then 1
>
> Then before applying the mask, replace the missing-value flags in your
> data with some other known value which will never appear in the valid data.
>
>    let u_adcp_2 = MISSING(u_adcp, -1.e10)
>
>    let u_adcp_april = u_adcp_2* mask_april
>    let u_adcp_compr = COMPRESSL(u_adcp_april )
>
> The variable u_adcp_april has the default Ferret missing-value flag so
> compressing it uses that flag, and will keep all other points including
> any values of -1.e10.
>
>     define axis/t=1:11:1 t11
>     let/bad=-1.e10 u_adcp_april_all = u_adcp_compr[gt=t11@ASN]
>
> and this should be all the april data, with any months that originally
> had missing data, still containing a missing-value flag.
>
> (I'm just typing commands here, so of course there may be typo's!)
>
> -Ansley
>
> On 1/4/2017 11:42 PM, Arijeet Dutta wrote:
>> Hi all
>> I have monthly current data (observation) from 2001 to 2011, with many
>> of the months of 2009 having no observation and hence no data. I
>> wanted to produce a plot where I can get only the April months from
>> 2001 to 2011 in the time axis. So I found posts helpful from ferret
>> archive and I did the following
>>
>> yes? yes?      let L_indx    = L[GT=u_adcp]
>> yes? yes?      let yr_months = L_indx- 12*INT((L_indx-1)/12)
>> yes? yes?      let mask_other_months = IF yr_months GT 3 AND yr_months
>> LT 5 THEN 1
>> yes? yes?      let u_adcp_masked = u_adcp * mask_other_months
>> yes? yes?      let u_adcp_compr  = COMPRESSL(u_adcp_masked)
>>
>> Now u_adcp_compr gives 10 data points since 2009 data for april is
>> missing. But I want a plot where 2009 april data should show missing
>> value but when I am doing
>>
>> yes? yes?      define axis/t=1:11:1 t11
>> yes? yes?      let u_adcp_april_all = u_adcp_compr[gt=t11@ASN]
>>
>> u_adcp_april_all shows 11th data points with the missing one being the
>> 11th one but I want 9th one to be missing; how can I better define the
>> time axis to avoid the problem??
>> Thanks
>> Arijeet
>
>


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

Privacy Policy | Disclaimer | Accessibility Statement