;+
;
; @file_comments
; save all the zoom parameters (defined by calling domdef)
; in a file (using save command) located in myuniquetmpdir
; (common variable defined by def_myuniquetmpdir)
;
; @param filename {in}{required} {type=scalar string}
; the file name
;
; @uses
; cm_4mesh (and cm_demomode if we are in demo mode)
;
; @restrictions
; call def_myuniquetmpdir, if myuniquetmpdir is undefined:
; => define, create and add it to !path
;
; @examples
;
; IDL> saveboxparam, filename
;
; @history
; Sebastien Masson (smasson\@lodyc.jussieu.fr)
; June 2005
;
; @version
; $Id$
;
;-
PRO saveboxparam, filename
;
compile_opt idl2, strictarrsubs
;
@cm_4mesh
;
def_myuniquetmpdir
;
IF lmgr(/demo) EQ 1 THEN BEGIN
; if we are in demo mode, we cannot save the parameters in a temporary file...
@cm_demomode_used
;
boxzoomparam = {bound:[lon1, lon2, lat1, lat2, vert1, vert2] $
, indexes:[firstxt, lastxt, firstyt, lastyt $
, firstxu, lastxu, firstyu, lastyu $
, firstxv, lastxv, firstyv, lastyv $
, firstxf, lastxf, firstyf, lastyf $
, firstzt, lastzt, firstzw, lastzw $
, nxt, nyt, nxu, nyu, nxv, nyv, nxf, nyf, nzt, nzw] $
, key:[key_shift, key_periodic, key_stride, key_gridtype $
, key_yreverse, key_zreverse, key_partialstep, key_onearth]}
;
ENDIF ELSE BEGIN
;
save, lon1, lon2, lat1, lat2, vert1, vert2 $
, firstxt, lastxt, firstyt, lastyt $
, firstxu, lastxu, firstyu, lastyu $
, firstxv, lastxv, firstyv, lastyv $
, firstxf, lastxf, firstyf, lastyf $
, firstzt, lastzt, firstzw, lastzw $
, nxt, nyt, nxu, nyu, nxv, nyv, nxf, nyf, nzt, nzw $
, key_shift, key_periodic, key_stride, key_gridtype $
, key_yreverse, key_zreverse, key_partialstep, key_onearth $
, filename = myuniquetmpdir + filename
;
ENDELSE
;
return
end