**To**:**antonio rodriguez <arv@xxxxxxx>, "ferret_users@xxxxxxxxxxxxxxxxxxx" <ferret_users@xxxxxxxxxxxxxxxxxxx>****Subject**:**Re: FFTA encountered missing data a ...****From**:**Ansley Manke <ansley@xxxxxxxxxxxxx>**- Date: Wed, 02 Oct 2002 09:44:39 -0700
- References: <163b61c04a.1c04a163b6@ono.com> <3D99CB95.41660153@pmel.noaa.gov><3D9AA96C.1050705@ono.com>
- Sender: owner-ferret_users@xxxxxxxxxxxxxxxxxxx

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

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

>

>

>

>

Ansley Manke Pacific Marine Environmental Laboratory Seattle WA (206)526-6246

**Follow-Ups**:**Re: FFTA encountered missing data a ...***From:*antonio rodriguez

**References**:**FFTA encountered missing data a ...***From:*arv

**Re: FFTA encountered missing data a ...***From:*Ansley Manke

**Re: FFTA encountered missing data a ...***From:*antonio rodriguez

- Previous by thread:
**Re: FFTA encountered missing data a ...** - Next by thread:
**Re: FFTA encountered missing data a ...**

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement