Changeset 484


Ignore:
Timestamp:
08/02/13 18:19:18 (11 years ago)
Author:
pinsard
Message:

add a test for tst_pltt for comparison interactif vs batch

Location:
trunk/SRC/Tests
Files:
1 added
1 copied

Legend:

Unmodified
Added
Removed
  • trunk/SRC/Tests/tst_pltt_zero.pro

    r483 r484  
    44; 
    55; @categories 
     6; test 
    67; 
    78; @keyword IMAGE 
    89; 
    910; @examples 
    10 ;   
     11; 
    1112; To run test with Levitus temperature on a regular 1x1 grid : 
    1213;   IDL> @tst_initlev 
    13 ;   IDL> tst_pltt 
     14;   IDL> tst_pltt_zero 
     15; 
     16; @todo 
     17; 
     18;  use routine in the name of images instead of hardcoded names 
    1419; 
    1520; @history 
    16 ; Sebastien Masson 
     21; 
     22;  - fplod 20130802T093208Z cratos.locean-ipsl.upmc.fr (Linux) 
     23; 
     24;    * creation from tst_pltt.pro 
     25;      to solve :: 
     26; 
     27;          % L.96 /Users/sflod/SAXO_DIR/SRC/ToBeReviewed/PLOTS/DIVERS/determineminmax.pro rev. 378: 
     28;          % Warning: constant filed, same value everywhere : 0.0000000! 
     29;          % READ: End of file encountered. Unit: 0, File: <stdin> 
     30;          % Execution halted at: REPORT            106 /Users/sflod/SAXO_DIR/SRC/Utilities/report.pro 
     31;          %                      DETERMINEMINMAX    96 /Users/sflod/SAXO_DIR/SRC/ToBeReviewed/PLOTS/DIVERS/determineminmax.pro 
     32;          %                      PLTT              359 /Users/sflod/SAXO_DIR/SRC/ToBeReviewed/PLOTS/DESSINE/pltt.pro 
     33;          %                      STD_TS_T           71 /Users/sflod/DEVELOP_NEMO/IDL_scripts/std_ts_t.pro 
     34;          %                      STD_TS_ALL         54 /Users/sflod/DEVELOP_NEMO/IDL_scripts/std_ts_all.pro 
     35;          %                      $MAIN$ 
     36; 
     37;      ask for batch session and use read statement when asking for next plot only in interactive mode 
    1738; 
    1839; @version 
     
    2041; 
    2142;- 
    22 PRO tst_pltt, IMAGE=image 
     43PRO tst_pltt_zero, IMAGE=image 
    2344; 
    2445  compile_opt idl2, strictarrsubs 
     
    2647@cm_4mesh 
    2748@cm_4cal 
     49@cm_general 
    2850; 
    2951; figure 2: regular grid 
     
    3557  ENDCASE 
    3658  file = isafile(file, title = 'Where is '+file+' ?', /lookalldir) 
    37   IF size(file, /type) NE 7 THEN return 
     59  IF size(file, /type) NE 7 THEN stop 
    3860; 
    3961  dummy = '' 
     
    4668; 
    4769  temp = read_ncdf('votemper', 00101, 01231, file = file) 
     70  zero_data = temp 
     71  zero_data.arr = 0. 
     72 
    4873  IF key_forgetold THEN help, temp.arr ELSE help, temp.tab 
    4974  help, jpt, time 
    50   pltt, temp 
    51   if keyword_set(image) then saveimage, 'tst_pltt_'+image+'_'+string(cnt, format = '(i2.2)')+'.png', /png $ 
    52   ELSE read, dummy,  prompt = 'press return for the next plot' 
     75  pltt, zero_data 
     76  if keyword_set(image) then begin 
     77      saveimage, 'tst_pltt_zero_'+image+'_'+string(cnt, format = '(i2.2)')+'.png', /png 
     78  ENDIF ELSE BEGIN 
     79      IF key_batch EQ 0 THEN BEGIN 
     80         read, dummy,  prompt = 'press stop for the next plot' 
     81      ENDIF 
     82  ENDELSE 
    5383  cnt = cnt + 1 
    5484; 
    55   pltt, temp, /nocontour 
    56   if keyword_set(image) then saveimage, 'tst_pltt_'+image+'_'+string(cnt, format = '(i2.2)')+'.png', /png $ 
    57   ELSE read, dummy,  prompt = 'press return for the next plot' 
     85  pltt, zero_data, /nocontour 
     86  if keyword_set(image) then begin 
     87      saveimage, 'tst_pltt_zero_'+image+'_'+string(cnt, format = '(i2.2)')+'.png', /png 
     88  ENDIF ELSE BEGIN 
     89      IF key_batch EQ 0 THEN BEGIN 
     90         read, dummy,  prompt = 'press stop for the next plot' 
     91      ENDIF 
     92  ENDELSE 
     93  cnt = cnt + 1 
     94 
     95  pltt, zero_data, /color_c 
     96  if keyword_set(image) then begin 
     97      saveimage, 'tst_pltt_zero_'+image+'_'+string(cnt, format = '(i2.2)')+'.png', /png 
     98  ENDIF ELSE BEGIN 
     99      IF key_batch EQ 0 THEN BEGIN 
     100         read, dummy,  prompt = 'press stop for the next plot' 
     101      ENDIF 
     102  ENDELSE 
    58103  cnt = cnt + 1 
    59104; 
    60   pltt, temp, /color_c 
    61   if keyword_set(image) then saveimage, 'tst_pltt_'+image+'_'+string(cnt, format = '(i2.2)')+'.png', /png $ 
    62   ELSE read, dummy,  prompt = 'press return for the next plot' 
    63   cnt = cnt + 1 
    64 ; 
    65   pltt, temp, /nofill 
    66   if keyword_set(image) then saveimage, 'tst_pltt_'+image+'_'+string(cnt, format = '(i2.2)')+'.png', /png $ 
    67   ELSE read, dummy,  prompt = 'press return for the next plot' 
     105  pltt, zero_data, /nofill 
     106  if keyword_set(image) then begin 
     107      saveimage, 'tst_pltt_zero_'+image+'_'+string(cnt, format = '(i2.2)')+'.png', /png 
     108  ENDIF ELSE BEGIN 
     109      IF key_batch EQ 0 THEN BEGIN 
     110         read, dummy,  prompt = 'press stop for the next plot' 
     111      ENDIF 
     112  ENDELSE 
    68113  cnt = cnt + 1 
    69114; 
     
    80125  ENDELSE 
    81126  temp = read_ncdf('votemper', 00101, 01231, file = file) 
     127  zero_data = temp 
     128  zero_data.arr = 0. 
    82129  IF key_forgetold THEN help, temp.arr ELSE help, temp.tab 
    83   pltt, temp 
    84   if keyword_set(image) then saveimage, 'tst_pltt_'+image+'_'+string(cnt, format = '(i2.2)')+'.png', /png $ 
    85   ELSE read, dummy,  prompt = 'press return for the next plot' 
     130  pltt, zero_data 
     131  if keyword_set(image) then begin 
     132      saveimage, 'tst_pltt_zero_'+image+'_'+string(cnt, format = '(i2.2)')+'.png', /png 
     133  ENDIF ELSE BEGIN 
     134      IF key_batch EQ 0 THEN BEGIN 
     135         read, dummy,  prompt = 'press stop for the next plot' 
     136      ENDIF 
     137  ENDELSE 
    86138  cnt = cnt + 1 
    87139; 
     
    97149 
    98150  temp = read_ncdf('votemper', 00101, 01231, file = file) 
     151  zero_data = temp 
     152  zero_data.arr = 0. 
    99153  IF key_forgetold THEN help, temp.arr ELSE help, temp.tab 
    100   pltt, temp 
     154  pltt, zero_data 
    101155 
    102   if keyword_set(image) then saveimage, 'tst_pltt_'+image+'_'+string(cnt, format = '(i2.2)')+'.png', /png 
     156  if keyword_set(image) then begin 
     157      saveimage, 'tst_pltt_zero_'+image+'_'+string(cnt, format = '(i2.2)')+'.png', /png 
     158  ENDIF 
    103159  cnt = cnt + 1 
    104160 
    105   return 
    106161end 
Note: See TracChangeset for help on using the changeset viewer.