One thing you could do, if there is just one missing timestep, is
to skip that first value by sending variable[l=2:428] to
the function.
Somebody on the list here might suggest the right way to deal
with missing time steps to get a good FFT analysis - a local
mean might be a better idea than the overall mean, as you'll
see from the example below.
If you want to get the mean and replace missing data with it, you
could do the following. I'll use a time series from the
COADS dataset, included with Ferret, to demonstrate.
USE coadsThe IF statement is saying that if there is good data in the
SET REGION/X=180/Y=0
LET smean = sst[T=@AVE]
LIST smeanLET filled_sst = IF sst THEN sst ELSE smean
SET VIEW upper
PLOT sstSET VIEW lower
PLOT filled_sst
antonio rodriguez wrote:
Hi Ansley,--Ansley Manke wrote:
> Hi Antonio,
> The FFT functions work on time series having no missing
> data. The error message indicates that the first time step of the
> data you're sending to the function has missing data. You might
> try listing the first few times of variable_mean[l=1:428] to
> see what's happening, or look at what is in the variable with
> the command
>
> yes? STAT variable_mean[l=1:428]You are rigth I have 1 value flagged as bad data at this location:
(i,j,k,l) -111 -111 -111 1How do I can overcome this problem? Maybe replacing the bad value with
the mean? but how?Thanks in advance
Cheers,
Antonio
>
> Ansley Manke
>
> arv@ono.com wrote:
>
>
>>Hi,
>>
>>I've tried to perform the following FFTA analysis but I get this
>>result.Don't know where is my mistake
>>
>>Thanks in advance.
>>
>>Antonio Rodriguez
>>
>>use wind.nc
>>DEF AXIS/T=16-JAN-1967:17-AUG-2002:1/UNITS=months regt
>> *** NOTE: /UNIT=MONTHS is ambiguous ... using 1/12 of 365.2425 days
>>DEF AXIS/X=10W:6W:1 x10
>>DEF AXIS/y=34n:38n:1 y10
>>DEFINE GRID/x=x10/y=y10 g10x10
>>SET GRID g10x10
>>LET regular_variable = UV_MAG_MEAN[GT=regt]
>>LET variable_mean = regular_variable[x=10w:6w@ave,y=34n:38n@ave]
>>LET FFT_variable = FFTA(variable_mean[l=1:428])
>> PLOT FFT_variable
>> *** NOTE: CYC/MONTHS is ambiguous ...
>>using 1/12 of 365 days.
>>
>>Bailing out of external function "ffta":
>> FFTA encountered missing data at (i,j,k,l) -111 -111 -111 1
>> **ERROR: : error in external function
>>
>
> --
> Ansley Manke Pacific Marine Environmental Laboratory Seattle WA (206)526-6246
>
>
>
>