[Thread Prev][Thread Next][Index]

Re: [ferret_users] time axis definition and precision



Hi Peter,

that works fine for daily files. But how to deal with the data, when they cover -lets day a whole year or more? The problem is, that you need the full information in seconds for a year, but the variable to create the time axis is modified (see below).

Any idea?

You need to keep the span of times within the 4-byte limit. If this is not possible - I think no chance.

However, possibly data with a period of seconds are not needed for a year or so. You will have to condense this huge amount of information somehow anyway. I suggest, to do this as soon as possible to get time units, which are more handsome.

Greetings,
Martin

let xmpl=DAYS1900(1900,12,31)
let secs={1,2,3,4,5,6,7,8,9}
list/format="(f14.2)" xmpl*86400+secs
list/format="(f14.2)" xmpl*86400+secs
            VARIABLE : XMPL*86400+SECS
            BAD FLAG : -9.9999998E+33
            SUBSET   : 9 points (X)
            X        : 0.5 to 9.5
  31449600.00
  31449602.00
  31449604.00
  31449604.00
  31449604.00
  31449606.00
  31449608.00
  31449608.00
  31449608.00



Am Dienstag, 20. Mai 2008 14:50 schrieb Martin Schmidt:
Peter,
I had the same problem several times.

To read daily data with a period of 1 s from a file, where times have
the form

2008-02-19 00:00:00
2008-02-19 00:00:01
...

I do the following:
let offset = DAYS1900 ( 2008, 1, 1)
define axis/x/x=1:86400:1 xax
define grid/x=xax xg
COLUMNS/deli=" "/grid=xg $1
let v1o=v1-offset
define axis/t/from_data/t0=1-jan-2008/unit=days time=v1o+v2/24 + 1e-5
define grid/t=time tgrid

From now on things work well.

Two things are needed, the offset to keep the time values limited and
the 1.e-5. Otherwise I get the same error message as you have got.

There are several show-ups of single precision limitations:
- long time axes with small time periods
- strong zooming of other axes, which gives occasionally good looking
but wrong plots
- seawater thermodynamics, i.e. relations between salinity, temperature
pressure and conductivity and so on ...

Greetings,
Martin




[Thread Prev][Thread Next][Index]

Contact Us
Dept of Commerce / NOAA / OAR / PMEL / TMAP

Privacy Policy | Disclaimer | Accessibility Statement