[Thread Prev][Thread Next][Index]

Re: [ferret_users] Title label variable help



Hi Selina,
             Your question was like :

     ...So at the top of the gif or ASCII file I would have
     something like this

     START DATE: 01/01/01
     END DATE: 01/03/01
     DATE MEANING: start and end date of data collection.

 and in my reply i explained how to do this (may be in a
slightly different format)...with strings as given below ?

     START DATE : 16-JAN-1982 20:00
     END   DATE : 17-DEC-1992 03:30
     DATE MEANING: start and end date of data collection

 this is the easy way to make time strings in Ferret, do
you need exactly in the format "START DATE: 01/01/01"
instead of the normal Ferret style
"START DATE : 16-JAN-1982 20:00"  ??

 In this case you need to write few more lines, but it is
possible.

 In your go file, you have to give proper X and Y locations
for the "LABEL" command (currently it is same values as the
example file...please change it and try again !!!):

    label `($PPL$XMIN1)*1.3`,12.5,-1,0,0.13 START DATE : `ts`

 Here each time you have to tune the first and second (x & y
locations) arguments to label command to get label at proper
place (fixed values, even with the qualifier /NOUSER is not
appropriate since the flexibility for using a defined viewport
will be lost then). Use PPL command

              yes? ppl list labels

  to know the co-ordinates of default plot (should be issued
before "go unlabel 4" and the FILL or PLOT command should not
contain "/NOLAB" qualifier). You can use these listed values
to get the desired label at the default position of an
automatic label.

 In your go file, you have 3 SHADE commands, the second
one doesnot have the /OVER qualifier and the labelling is
done after the first plot .....so you will loose that label
automatically.....Hope now you got the problems with your
go file.

With Regards

Jaison

On Tue, 5 Jul 2005, Selina Satterfield wrote:

I was able to add the label to the gif file using the
information you supplied to my code I had it in the
incorrect place,however, I still have the question
about only removing the TIME header and adding my own
though Thank you for your help.

Selina



--- Selina Satterfield <satterfields2000@yahoo.com>
wrote:

Hello Jaison,

I'm having a little difficulty creating my labels. I
want to be able to use the variable that is passed
to
the jnl file for setting the start and end time
labels
but I'm not sure of the syntax for example where $2
is
the variable that I want to obtain the start time
from:
let ts = "`$2,r=tstart`"   ! starting time

Also the new labels aren't displaying here is my
code

! Parameter Order           1         2           3

! Usage: vis_draw_rect [monthly] [variable]
[landmap]

!1 1(monthly data), 0(nonmonthly data)
!2 variable
!3 1(draw land map), 0(no land map)

! define data viewport
define view/xlimits=0:1/ylimits=0.2:1 dataview
set view dataview

! obtain start and end time of the data so can
display
on the GIF
let ts = "Temp Text until get correct syntax"

if $1 then  ! ver5.0 not allow brackets
	SET MODE CALENDAR:MONTHS
endif

SHADE/SET/LEVELS=1/nokey/lev=(-99999) $2

!Remove Time from graph
go unlabel 4
PPL SHADE

!Add Start Time label
label `($PPL$XMIN1)*1.3`,12.5,-1,0,0.13 START DATE :
`ts`

SHADE/LEVELS=1/nolab/nokey/pal=black missing($2, 0)
SHADE/LEVELS=23/nolab/pal=default/key/over $2


! outline land map for PATHFINDER
if $3 then

	go land black overlay
endif

Another question I had is for creating ASCII, TAB,
and
COMMA text files. The out put for TAB looks like
this:
             VARIABLE : Analysis Temperature (Deg.
C)
             DATA SET : SST 100KM GLOBAL
             FILENAME : MY_Descriptor.des
             FILEPATH : /DocRoot/User/www/product/
             BAD FLAG :   999.9000
             SUBSET   : 361 by 141 points
(LONGITUDE-LATITUDE)
             TIME     : 16-MAY-2005 00:00

coordinates	0E  	1E  	2E  	3E  	4E    . . . .
70S	999.9	999.9	999.9	999.9	999.9	999.9 . . . .
69S	-1.7	-1.7	-1.7	-1.7	-1.7	-1.1  . . . .
68S	-1.7	-1.7	-1.7	-1.7	-1.7	-1.7  . . . .
. . . .

            VARIABLE : Analysis Temperature (Deg. C)
             DATA SET : SST 100KM GLOBAL
             FILENAME : MY_Descriptor.des
             FILEPATH :
/DocRoot/VisUser/www/product/
             BAD FLAG :   999.9000
             SUBSET   : 361 by 141 by 2 points
(LONGITUDE-LATITUDE-TIME)

coordinates	0E  	1E  	2E  	3E  	4E    . . . .
---- L:1 T:   16-MAY-2005 00:00
70S	999.9	999.9	999.9	999.9	999.9	999.9 . . . .
69S	-1.7	-1.7	-1.7	-1.7	-1.7	-1.1  . . . .
68S	-1.7	-1.7	-1.7	-1.7	-1.7	-1.7  . . . .
. . . .
---- L:2 T:   17-MAY-2005 00:00
70S	999.9	999.9	999.9	999.9	999.9	999.9 . . . .
69S	-1.6	-1.6	-1.6	-1.6	-1.6	-1    . . . .
68S	-1.6	-1.6	-1.6	-1.6	-1.6	-1.6  . . . .
. . . .

Is there any way to remove only the time instead of
the entire header through nohead?
TIME     : 16-MAY-2005 00:00
and
---- L:1 T:   16-MAY-2005 00:00

I would like the header for a single date to look
like
the default but only have
START TIME: 16-MAY-2005 00:00
END TIME: 17-MAY-2005 00:00

and for files with muliple dates the header would be
the same but instead of this
---- L:1 T:   16-MAY-2005 00:00
I would like to have the following:
---- L:1 T:   16-MAY-2005 00:00 to 17-MAY-2005 00:00


Thank  you for your time.

Selina

--- Jaison Kurian <jaison@caos.iisc.ernet.in> wrote:

Hi Selina,
            Here is an example script using the
monthly_navy_winds
dataset available with Ferret. Please find the
explanations inside
the script. If you have any difficulties, let me
know.

Hope this helps

With Regards

Jaison

!------------example.jnl---------------

\ cancel mode verify

   set data monthly_navy_winds  ! open dataset
   sh da                        ! see the contents
of the file

   let ts = "`uwnd,r=tstart`"   ! starting time
   let te = "`uwnd,r=tend`"     ! ending   time
   let txt= "DATE MEANING: start and end date of
data collection" ! 51 chars
                                  ! description

   plot/x=70/y=10/set uwnd        ! plot
      go remove_logo              ! remove ferret
logo
      go unlabel 4 ; go unlabel 5 ; go unlabel 6 !
remove time/dset_name
   ppl plot                       ! deliver the
plot
 ! choose proper x and y values to place the
labels

   label `($PPL$XMIN1)*1.3`,12.5,-1,0,0.13 START
DATE : `ts`
   label `($PPL$XMIN1)*1.3`,12.0,-1,0,0.13 END
DATE : `te`
   label `($PPL$XMIN1)*1.3`,11.5,-1,0,0.13 `txt`

 ! to write this stuff to a text file

   sp rm -f temp.txt ! to remove previous versions

   let ts1 = STRCAT("START DATE : ","`ts`")  !
assign a variable name for
   let te1 = STRCAT("END   DATE : ","`te`")  ! the
text in one line (30 chars)

   list/file=temp.txt/nohead/format=(A30) ts1

  ! format statemet
   list/file=temp.txt/nohead/format=(A30)/append
te1
  !  is for a neat
   list/file=temp.txt/nohead/format=(A51)/append
txt
  !  appearance in the
   list/x=70/y=10/file=temp.txt/append uwnd

  !  text file

 ! gif file

   FRAME/FILE=temp.gif
!-------------------------end of
example.jnl------------------------

On Thu, 24 Mar 2005, Selina Satterfield wrote:

Hello everyone,

=== message truncated ===




____________________________________________________
Yahoo! Sports
Rekindle the Rivalries. Sign up for Fantasy Football
http://football.fantasysports.yahoo.com


[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement