\cancel mode verify 
!++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++!
! wv5d.jnl
! *acm* 7/98
 
! Description:  Write up to 8 Ferret variables to a Vis5D file.

!                                arg 1   arg 2  arg 3  arg 4      arg 9   
!  usage:  yes? GO vis5d_write filename  var1  [var2] [var3] ... [var8]
! $1 - the Vis5D file name, defaults to vis5d_out.v5d
! $2 - First Ferret variable to write
! $3 - (optional) further variables to write
! ...
! $9 - (optional) further variables to write

! example:
!   yes? SET DATA coads_climatology
!   yes? GO vis5d_write coads-clim.v5d sst airt uwnd vwnd

! Check arguments

QUERY/IGNORE $2"<vis5d_write writes at least one variable to the file. Supply variable name"

!  Define the file and load vflag to call the external function and write it.

LET/QUIET vflag = writev5d($2, $3%0%, $4%0%, $5%0%, $6%0%, $7%0%, $8%0%, $9%0%, "$1%vis5d_out.v5d%")

LOAD/TEMPORARY vflag

!  Give an option of viewing the file now.

SAY To view the file with Vis5D say:   GO vis5d_start $1%vis5d_out.v5d%

set mode/last verify
