[Thread Prev][Thread Next][Index]

Re: Ferret question



Help!
I'm a new user and my Ferret commands are very basic.  I'm comparing global
wind models with buoy data and am having problems handling the missing data in
the ASCII buoy files.  Ferret seems to want to interpolate across any gaps in
time in the buoy data.  I would like to have missing data in the gaps so I
don't have any "fake" data in my comparisons.
My backup plan is to fill the gaps with missing data values using a Fortran
program then bring it into Ferret. I am wondering if there is something simple
I can do in Ferret to put in missing data.

Here is the code I'm using.  The derivative method I'm trying to use only works
to remove large gaps.

define axis/t=1:35040:1 tax1
define grid/t=tax1 readgrid
set
data/ez/grid=readgrid/skip=0/var="buoy,yr,mo,da,hr,mi,airt,spl,uwind,vwind,sst1"/columns=11
"/disk46/mpickett/46030hr"
show data
let time=days1900(yr,mo,da)*24+hr
define axis/from_data/t/units=hours/name=tax2/t0="01-jan-1900" time
define grid/t=tax2 timegrid
set
data/ez/skip=0/var="buoy,yr,mo,da,hr,mi,airt,spl,uwind,vwind,sst1"/columns=11/grid=timegrid
"/disk46/mpickett/46030hr"
show data
define axis/x=121.9w:121.89w:.01/units=degrees xaxis
define axis/y=35.7n:35.71n:.01/units=degrees yaxis
define axis/t="01-jan-1997":"31-dec-2000:18:00":01/units=hours tax3
define grid/x=xaxis/y=yaxis/t=tax3 spacegrid
let zero=0*(i+j)
let u=uwind[g=spacegrid]/-100.+zero
let v=vwind[g=spacegrid]/-100.+zero
let sst=sst1[g=spacegrid]/-100.+zero

!Use to remove any interpolations done by Ferret
let du=u[t=@ddf]
let uclean= if abs(du) lt 5e-6 then (-99.99) else u
let vclean= if abs(du) lt 5e-6 then (-99.99) else v
let sstclean=if abs(du) lt 5e-6 then (-99.99) else sst
set var/bad=-99.99 uclean
set var/bad=-99.99 vclean
set var/bad=-99.99 sstclean

save/format=cdf/file="/disk46/mpickett/buoy_46030.nc" uclean,vclean,sstclean


Here is a sample of a ASCII buoy data file with a large time gap (some are only
a few days and harder to detect).

46028 1997  7 17  0 50  144 10143  -865   541 1410
46028 1997  7 17  1 50  145 10141  -827   694 1410
46028 1997  7 17  2 50  145 10141  -636   785 1410
46028 1997  7 17  3 50  142 10139  -825   743 1410
46028 1997  7 17  4 50  141 10137  -750   750 1410
46028 1997  7 17  5 50  142 10135  -785   813 1410
46028 1997  7 17  6 50  141 10134  -797   743 1410
46028 1997  7 17  7 50  141 10129  -832   749 1410
46028 1997  7 17  8 50  141 10129  -848   530 1410
46028 1997  7 17  9 50  142 10131 -1008   328 1410
46028 1998  8 14 17 50  142 10164  -183   344 1600
46028 1998  8 14 18 50  144 10158  -290   196 1640
46028 1998  8 14 19 50  145 10156  -334   135 1640
46028 1998  8 14 20 50  145 10150  -547   221 1640
46028 1998  8 14 21 50  149 10147  -506   341 1640
46028 1998  8 14 22 50  151 10136  -357   457 1640
46028 1998  8 14 23 50  152 10135  -499   276 1640

Thanks for any help anyone can provide.
-Mark Pickett-



Steve Hankin wrote:

> Hi Mark,
>
> I'm afraid that you havn't provided enough details to know for sure what the
> problem is.
>
> Can you send you question again, but include a fragment of the ASCII data
> file, which shows how missing values and times are represented, and also
> include your Ferret commands.
>
> May I suggest that you resubmit the question to ferret_users -- usually
> someone will have a quick answer.
>
>     - steve
>
> ===========================
>
> mpickett@upwell.pfeg.noaa.gov wrote:
>
> > I'm stuck on a Ferret problem and was hoping you could give me some
> > help.
> > I'm loading ASCII buoy files to plot buoy winds over FNMOC model winds
> > for comparisons.
> > The buoy data has gaps when the instruments are broken.
> > When I put the buoy data into a time grid, Ferret wants to interpolate
> > across the missing times.
> > I've tried to cancel mode interpolate and bad=-9999 but it still wants
> > to fill those voids with a number.
> > I'd like to fill the voids with "...." missing data.
> > Do you have any ideas?
> >
> > My current plan is to use a Fortran routine on the buoy data to find the
> > gaps and put in missing data.
> > Then open it up into Ferret.
> > Thanks,
> > -Mark Pickett-
begin:vcard 
n:Pickett;Mark
tel;fax:(831) 648-8440
tel;work:(831) 484-0162
x-mozilla-html:FALSE
org:NOAA;Pacific Fisheries Environmental Laboratory
version:2.1
email;internet:mpickett@pfeg.noaa.gov
title:Oceanographer
adr;quoted-printable:;;NOAA/PFEL=0D=0A1352 Lighthouse Ave=0D=0A;Pacific Grove;Ca;93950;USA
x-mozilla-cpt:;3
fn:Mark Pickett
end:vcard

[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement