Index: trunk/SRC/Tests/tst_pltt_zero.pro
===================================================================
--- trunk/SRC/Tests/tst_pltt.pro	(revision 371)
+++ trunk/SRC/Tests/tst_pltt_zero.pro	(revision 484)
@@ -4,15 +4,36 @@
 ;
 ; @categories
+; test
 ;
 ; @keyword IMAGE
 ;
 ; @examples
-;  
+;
 ; To run test with Levitus temperature on a regular 1x1 grid :
 ;   IDL> @tst_initlev
-;   IDL> tst_pltt
+;   IDL> tst_pltt_zero
+;
+; @todo
+;
+;  use routine in the name of images instead of hardcoded names
 ;
 ; @history
-; Sebastien Masson
+;
+;  - fplod 20130802T093208Z cratos.locean-ipsl.upmc.fr (Linux)
+;
+;    * creation from tst_pltt.pro
+;      to solve ::
+;
+;          % L.96 /Users/sflod/SAXO_DIR/SRC/ToBeReviewed/PLOTS/DIVERS/determineminmax.pro rev. 378:
+;          % Warning: constant filed, same value everywhere : 0.0000000!
+;          % READ: End of file encountered. Unit: 0, File: <stdin>
+;          % Execution halted at: REPORT            106 /Users/sflod/SAXO_DIR/SRC/Utilities/report.pro
+;          %                      DETERMINEMINMAX    96 /Users/sflod/SAXO_DIR/SRC/ToBeReviewed/PLOTS/DIVERS/determineminmax.pro
+;          %                      PLTT              359 /Users/sflod/SAXO_DIR/SRC/ToBeReviewed/PLOTS/DESSINE/pltt.pro
+;          %                      STD_TS_T           71 /Users/sflod/DEVELOP_NEMO/IDL_scripts/std_ts_t.pro
+;          %                      STD_TS_ALL         54 /Users/sflod/DEVELOP_NEMO/IDL_scripts/std_ts_all.pro
+;          %                      $MAIN$
+;
+;      ask for batch session and use read statement when asking for next plot only in interactive mode
 ;
 ; @version
@@ -20,5 +41,5 @@
 ;
 ;-
-PRO tst_pltt, IMAGE=image
+PRO tst_pltt_zero, IMAGE=image
 ;
   compile_opt idl2, strictarrsubs
@@ -26,4 +47,5 @@
 @cm_4mesh
 @cm_4cal
+@cm_general
 ;
 ; figure 2: regular grid
@@ -35,5 +57,5 @@
   ENDCASE
   file = isafile(file, title = 'Where is '+file+' ?', /lookalldir)
-  IF size(file, /type) NE 7 THEN return
+  IF size(file, /type) NE 7 THEN stop
 ;
   dummy = ''
@@ -46,24 +68,47 @@
 ;
   temp = read_ncdf('votemper', 00101, 01231, file = file)
+  zero_data = temp
+  zero_data.arr = 0.
+
   IF key_forgetold THEN help, temp.arr ELSE help, temp.tab
   help, jpt, time
-  pltt, temp
-  if keyword_set(image) then saveimage, 'tst_pltt_'+image+'_'+string(cnt, format = '(i2.2)')+'.png', /png $
-  ELSE read, dummy,  prompt = 'press return for the next plot'
+  pltt, zero_data
+  if keyword_set(image) then begin
+      saveimage, 'tst_pltt_zero_'+image+'_'+string(cnt, format = '(i2.2)')+'.png', /png
+  ENDIF ELSE BEGIN
+      IF key_batch EQ 0 THEN BEGIN
+         read, dummy,  prompt = 'press stop for the next plot'
+      ENDIF
+  ENDELSE
   cnt = cnt + 1
 ;
-  pltt, temp, /nocontour
-  if keyword_set(image) then saveimage, 'tst_pltt_'+image+'_'+string(cnt, format = '(i2.2)')+'.png', /png $
-  ELSE read, dummy,  prompt = 'press return for the next plot'
+  pltt, zero_data, /nocontour
+  if keyword_set(image) then begin
+      saveimage, 'tst_pltt_zero_'+image+'_'+string(cnt, format = '(i2.2)')+'.png', /png
+  ENDIF ELSE BEGIN
+      IF key_batch EQ 0 THEN BEGIN
+         read, dummy,  prompt = 'press stop for the next plot'
+      ENDIF
+  ENDELSE
+  cnt = cnt + 1
+
+  pltt, zero_data, /color_c
+  if keyword_set(image) then begin
+      saveimage, 'tst_pltt_zero_'+image+'_'+string(cnt, format = '(i2.2)')+'.png', /png
+  ENDIF ELSE BEGIN
+      IF key_batch EQ 0 THEN BEGIN
+         read, dummy,  prompt = 'press stop for the next plot'
+      ENDIF
+  ENDELSE
   cnt = cnt + 1
 ;
-  pltt, temp, /color_c
-  if keyword_set(image) then saveimage, 'tst_pltt_'+image+'_'+string(cnt, format = '(i2.2)')+'.png', /png $
-  ELSE read, dummy,  prompt = 'press return for the next plot'
-  cnt = cnt + 1
-;
-  pltt, temp, /nofill
-  if keyword_set(image) then saveimage, 'tst_pltt_'+image+'_'+string(cnt, format = '(i2.2)')+'.png', /png $
-  ELSE read, dummy,  prompt = 'press return for the next plot'
+  pltt, zero_data, /nofill
+  if keyword_set(image) then begin
+      saveimage, 'tst_pltt_zero_'+image+'_'+string(cnt, format = '(i2.2)')+'.png', /png
+  ENDIF ELSE BEGIN
+      IF key_batch EQ 0 THEN BEGIN
+         read, dummy,  prompt = 'press stop for the next plot'
+      ENDIF
+  ENDELSE
   cnt = cnt + 1
 ;
@@ -80,8 +125,15 @@
   ENDELSE
   temp = read_ncdf('votemper', 00101, 01231, file = file)
+  zero_data = temp
+  zero_data.arr = 0.
   IF key_forgetold THEN help, temp.arr ELSE help, temp.tab
-  pltt, temp
-  if keyword_set(image) then saveimage, 'tst_pltt_'+image+'_'+string(cnt, format = '(i2.2)')+'.png', /png $
-  ELSE read, dummy,  prompt = 'press return for the next plot'
+  pltt, zero_data
+  if keyword_set(image) then begin
+      saveimage, 'tst_pltt_zero_'+image+'_'+string(cnt, format = '(i2.2)')+'.png', /png
+  ENDIF ELSE BEGIN
+      IF key_batch EQ 0 THEN BEGIN
+         read, dummy,  prompt = 'press stop for the next plot'
+      ENDIF
+  ENDELSE
   cnt = cnt + 1
 ;
@@ -97,10 +149,13 @@
 
   temp = read_ncdf('votemper', 00101, 01231, file = file)
+  zero_data = temp
+  zero_data.arr = 0.
   IF key_forgetold THEN help, temp.arr ELSE help, temp.tab
-  pltt, temp
+  pltt, zero_data
 
-  if keyword_set(image) then saveimage, 'tst_pltt_'+image+'_'+string(cnt, format = '(i2.2)')+'.png', /png
+  if keyword_set(image) then begin
+      saveimage, 'tst_pltt_zero_'+image+'_'+string(cnt, format = '(i2.2)')+'.png', /png
+  ENDIF
   cnt = cnt + 1
 
-  return
 end
