[Thread Prev][Thread Next][Index]

Re: Not stop when error happens!



Hi Yunyao,
This  problem is not due to "-gif" but to the behavior of Unix redirection.

When you redirect input "< my_go.jnl" it is equivalent to typing in the
lines of the file at the Ferret prompt. After an error occurs if a user types
in further lines, Ferret will execute them  The same thing happens here.

You needs to do something like

     " ferret  -gif  <  my_go_shell.jnl "

where my_go_shell.jnl contains the single line "go my_go.jnl; exit"

Then my_go.jnl is run as a Ferret script (via the GO command), rather
than as lines of redirected user input.

Ansley Manke

Yunyao Qu wrote:

Hi, All

 I use  " ferret  -gif  <  my_go.jnl " to run the Ferret,  but it will NOT stop (when error happened) and continue to execute the rest commands in  my_go.jnl   and produce garbage blank  image file(SHADE and FRAME was used).
Can we stop it or catch it when some errors (unpredictable) happened?

Attached is sample GO file. It will produce blank images if error happened before SHADE and FRAME.

Thanks a lot,

Yunyao

========================
  CANCEL MODE JOURNAL
  CANCEL MODE IGNORE_ERROR
  USE SAA_Descriptor
  SET WINDOW/SIZE=0.5
  define view/xlimits=0:1/ylimits=0.2:1 dataview
  set view dataview
  set window/clear
  SET REGION/Y=-68:62/X=216:0/L=1
  LET ngood = avgrad[x=@NGD,y=@NGD]
  LET nbad = avgrad[x=@NBD,y=@NBD]
  IF `ngood GT 0.1*nbad` THEN
  SHADE/LEVELS=1 avgrad
  SHADE/LEVELS=1/nolab/nokey/pal=black missing(avgrad,0)
  SHADE/LEVELS=23/nolab/pal=default/key/over avgrad
 FRAME/FORMAT=GIF/FILE="/saa_dev/HTML/SWIG/2001-Oct-23_-68_62_216_0_avgrad_SST14NA_0.5.GIF"
  ENDIF

  define view/xlimits=0:1/ylimits=0.2:1 dataview
  set view dataview
  set window/clear
  SET REGION/Y=-68:62/X=216:0/L=2
  LET ngood = avgrad[x=@NGD,y=@NGD]
  LET nbad = avgrad[x=@NBD,y=@NBD]
  IF `ngood GT 0.1*nbad` THEN
  SHADE/LEVELS=1 avgrad
  SHADE/LEVELS=1/nolab/nokey/pal=black missing(avgrad,0)
  SHADE/LEVELS=23/nolab/pal=default/key/over avgrad
 FRAME/FORMAT=GIF/FILE="/saa_dev/HTML/SWIG/2001-Oct-24_-68_62_216_0_avgrad_SST14NA_0.5.GIF"
  ENDIF
  sp rm -f ferret.jnl
  QUIT
 

--
Ansley Manke  Pacific Marine Environmental Laboratory  Seattle WA  (206)526-6246
 


[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement