[Thread Prev][Thread Next][Index]

Re: [ferret_users] suppress X window



Hi Ansley,

Thank you for your help!

On Tue, Dec 18, 2018 at 3:47 AM Ansley C. Manke <ansley.b.manke@xxxxxxxx> wrote:

I don't know why what you are trying is not working; this is what -batch is intended for.  My experiments with commands such as you show seem to be working ok.  You could try what you're doing but with the postscript batch option, which will write a postscript file, but also execute your metafile commands.

# Call Ferret many times, changing the parameter n
for n in . . . ; do
    ferret -batch dummy.ps -script myscript.jnl $n
done

Thanks.  It's good to know that it is supposed to work.  I'm attaching a self-contained Ferret script which I don't know how to make work with the "-batch" option.  The following is my result on Ferret v6.94 on macOS Mojave.  1) With "-batch dummy.ps", the metafile isn't generated; 2) With "-batch", a metafile of size 0 is generated; 3) Without "-batch", the metafile is successfully generated.

$ ferret -batch dummy.ps -script ferret-batch-test.jnl 1
rm: metafile.plt*: No such file or directory
ls: metafile.plt: No such file or directory  #<-- metafile not generated!
gopenws()   26 Specified workstation cannot be opened
Error 1 opening GKS metafile metafile.plt -- file not found
$ ferret -batch -script ferret-batch-test.jnl 1
-rw-r--r--+ 1 furue  staff  0 Dec 19 15:27 metafile.plt #<-- metafile generated but size 0.
gopenws()   26 Specified workstation cannot be opened
Error 1 opening GKS metafile metafile.plt -- file not found
$ ferret -script ferret-batch-test.jnl 1
-rw-r--r--+ 1 furue  staff  5740304 Dec 19 15:27 metafile.plt
$

In the meanwhile, I'll try to install PyFerret on our Linux servers.

Regards,
Ryo

!==== ferret-batch-test.jnl ====
\cancel mode verify

!---
let k1 = ($1)

!------------
set data levitus_climatology

SPAWN rm metafile.plt*
set mode metafile

fill/k=`k1` temp

cancel mode metafile
ppl clsplt

SPAWN ls -l metafile.plt
SPAWN gksm2ps -o "tmp.ps" metafile.plt


[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement