[Thread Prev][Thread Next][Index]

Re: [ferret_users] listing a date/time value in a label



Hi Hein,
          It is very easy, get the time string in a variable using 
RETURN command (as you mentioned), edit that time string (if you
want) and then use that edited string for labelling. Two examples 
are given below :


Example 1
---------
  ! use "set reg" --> time is set to a fixed point, hence tstart and
  !        tend will be same as the time fixed by 'set reg' command
  !----------------------------------------------------------------

   use monthly_navy_winds

   set reg/l=10

   shade /nolab uwnd ;   go land
   let dstring = "`uwnd[d=1],return=tstart`"  ! return=tend also work
   let cdate   = SUBSTRING(dstring,1,11)      ! if we need only date
   label 180, 105, 0, 0, 0.15 @C007`cdate`

Example 2
----------
  ! specify time explicitly using L index, use the same index for 
  ! plot and dtring. Here also both tend and tstart will give same
  ! time point.
  !---------------------------------------------------------------

   use monthly_navy_winds

   shade/nolab uwnd[l=20] ;  go land
   let dstring = "`uwnd[d=1,l=20],return=tstart`" ! return=tend also work
   let cdate   = SUBSTRING(dstring,1,11)          ! if we need only date
   label 180, 105, 0, 0, 0.15 @C007`cdate

Hope this helps,

Jaison

On Tue, 13 Mar 2007, Hein Zelle wrote:

> Dear Ferret users,
> 
> how can I put a time value (as shown for example by list t[g=myvar])
> in a text label?  I want something similar to
> 
> say `myvar, return=tend`
> 
> but instead of the last time value, I want to specify the time index
> or use the current region.  The following does not work (gives the
> numerical time value instead of a formatted date/time string):
> 
> say `t[g=myvar,l=10]`
> 
> Any help appreciated.
> Kind regards,
> 
>      Hein Zelle
> 
> 


[Thread Prev][Thread Next][Index]

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

Privacy Policy | Disclaimer | Accessibility Statement