[Thread Prev][Thread Next][Index]
Re: [ferret_users] Plotting variable with alternate time axis
Hi,
Of course this assumes that the units of time in your original data set
are hours!
I think you need to do a
SAY `sos,r=tunit`
in order to check. You could probably make it automatic along the lines
of
def sym timeunits = `sos,r=tunit`
let offset = ($timeunits"|hour>10|day>`10/24`")
Russ
On Sun, 2013-03-17 at 09:28 +1100, Andrew Wittenberg - NOAA Federal
wrote:
> Hi Paul,
>
> Simple answer is:
>
> define axis/t timeaxnew = t[gt=sos] + 10
> let sos_new = sos[gt=timaxnew@asn]
>
> Or here's a fancy version, to keep all the axis and variable attributes:
>
> def ax/t/unit="`sos,r=tunit`"/cal="`sos,r=cal`"/t0="`sos,r=t0`" timeaxnew =
> t[gt=sos] + 10
> let/title="`sos,r=title`"/unit="`sos,r=unit`" sos_new = sos[gt=timeaxnew@asn]
>
> Andrew
>
> On 03/16/2013 05:04 PM, Durack, Paul J. wrote:
> > Hi there folks..
> >
> > I have a super noob question which I've been unable to resolve without
> > assistance..
> >
> > I have a variable which has a time coordinate in UTC, I want to plot this
> > using ferret with the time indicated automagically to show the local +10
> > (not UTC) time, so in effect adding 10hrs to each element of the time
> > axis.. I'm sure this is really simple, however I'm really struggling to
> > get my syntax correct
> >
> >
> > So I've tried:
> >
> > [dir]$ ferret -nojnl NOAA/PMEL TMAP
> > FERRET v6.82
> > Linux 2.6.32-279.1.1.el6.x86_64 64-bit - 08/03/12
> > 16-Jan-13 13:02
> >
> > yes? use infile.nc
> > yes? sh da
> > currently SET data sets:
> > 1> ./infile.nc (default)
> > name title I J K
> > L M N
> > SOS Sea Surface Salinity 1:192 1:189 ...
> > 1:156 ... ...
> > yes? show grid sos
> > GRID GFG1
> > name axis # pts start end
> > LON LONGITUDE 192mr 0E 1.875W
> > LAT LATITUDE 189 i 88.195S 87.24N
> > normal Z
> > TIME TIME 156 r 02-JUL-1850 12:00 02-JUL-2005
> > 12:00
> > normal E
> > normal F
> > yes? let timeax = T[GT=sos]
> > yes? define axis/T timeaxnew=timeax+10
> > yes? show grid sos
> > GRID GFG1
> > name axis # pts start end
> > LON LONGITUDE 192mr 0E 1.875W
> > LAT LATITUDE 189 i 88.195S 87.24N
> > normal Z
> > TIME TIME 156 r 02-JUL-1850 12:00 02-JUL-2005
> > 12:00
> > normal E
> > normal F
> >
> >
> > Now I have the data (sos variable) and I have my new time axis (timeaxnew,
> > which I presume has been incremented by 10 hrs), how do I now plot this
> > using the new axis?
> >
> >
> > I've been using:
> > yes? sha sos[l=1] ! How do I use a new time axis, or add 10hrs to each
> > timestep?
> >
> >
> > Some help cleaning up my syntax here would certainly be appreciated!
> >
> > Cheers,
> >
> > P
> >
> >
>
[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce /
NOAA /
OAR /
PMEL /
Ferret
Privacy Policy | Disclaimer | Accessibility Statement