[Thread Prev][Thread Next][Index]
Re: [ferret_users] Problem with 6 hourly to daily average
No, Satyeesh's time syntax is correct: there must be a ':' between the day and the hour in a time specification. That's why the quotes are needed; otherwise the hour would be interpreted as another argument (e.g., delta-t). I would have thought the minutes also needed to be specified but apparently not.
But if you want a daily average, it would be safer to define it explicitly, depending on what exactly you mean by a daily average.
If you intend it to be the mean of the values at hours 0,6,12,18, then
! make an explicit running 4-timestep average:
let var_daily_ave = (var+var[l=@shf:1]+var[l=@shf:2]+var[l=@shf:3])/4
Now subsample at hour 0:
define axis/t="01-jan-1993":"31-dec-2017":1/units=day t24h
let var_d = var_daily_ave[gt=t24h]
! check your work for an interval short enough to see what's happening:
plot/t=some_start_date:some_end_date var,var_d
> On Feb 9, 2019, at 6:50 AM, Martin Schmidt <martin.schmidt@xxxxxxxxxxxxxxxxx> wrote:
>
> Hi,
>
> seems the syntax of your times is not correct. I should be:
> define axis/t="01-jan-1993 00:00":"31-dec-2017 18:00"/units=days/npoints=36524 t6
>
> The same for the other axis.
> Best,
> Martin
> Am 09.02.2019 um 15:35 schrieb Satyesh Ghetiya:
>> Dear all,
>> I am wanting to convert 6 hourly (0,6,12,18 hr) data to daily average.
>>
>> 6 hourly existing time axis, of variable var, is:
>> define axis/t="01-jan-1993:00:00":"31-dec-2017:18:00"/units=days/npoints=36524 t6
>>
>> and daily time axis (on which I want my final average) is:
>> define axis/t="01-jan-1993:09":"31-dec-2017:09":24/units=hours t9
>>
>> Now, following step should give my desired daily final mean:
>> let var_d=var[gt=t9@ave]
>>
>> (Above method is given by the thread :../fu_2004/msg00540.html )
>>
>> But the problem is: var_d is not being calculated except at l=1. I have improvised all steps and all seem very fine, so var_d should give all daily values. But, except at l=1, all other l's are showing 'No Valid Data'. Any experience in this regard ?
>>
>> Hope to hear soon.
>>
>> Regards,
>> G Satyesh
>>
>
[Thread Prev][Thread Next][Index]