[Thread Prev][Thread Next][Index]

Re: FFTA encountered missing data a ...



Hi Antonio,
First, we're going to replace the FFT function's error message
so that if you have sent in a 1-D time series, the error message
will just say "missing data at L = 1"  rather than the confusing list
of  indices  -111 -111 -111    1

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 coads
SET REGION/X=180/Y=0
LET smean = sst[T=@AVE]
LIST smean

LET filled_sst = IF sst THEN sst ELSE smean

SET VIEW upper
PLOT sst

SET VIEW lower
PLOT filled_sst

The IF statement is saying that if there is good data in the
variable, then use it, else replace by the mean.  This is
called masking, and you can find it in the Users Guide under
"masking, IF-THEN-ELSE logic".

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    1

How 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
>
>
>
>

--
Ansley Manke  Pacific Marine Environmental Laboratory  Seattle WA  (206)526-6246
 
[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement