;+ ; ; @file_comments ; ; @categories ; test ; ; @keyword IMAGE ; ; @examples ; ; To run test with Levitus temperature on a regular 1x1 grid : ; IDL> @tst_initlev ; IDL> tst_pltt_zero ; ; @todo ; ; use routine in the name of images instead of hardcoded names ; ; @history ; ; - 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: ; % 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 ; $Id$ ; ;- PRO tst_pltt_zero, IMAGE=image ; compile_opt idl2, strictarrsubs ; @cm_4mesh @cm_4cal @cm_general ; ; figure 2: regular grid ; CASE jpi*key_stride[0]+jpj*key_stride[1] OF 180+148:file = 'Levitus98_1m_01_12_Temperature_Pot_ORCA2.nc' 360+180:file = 'Levitus98_1m_01_12_Temperature_Pot_1x1.nc' 720+510:file = 'Levitus98_1m_01_12_Temperature_Pot_ORCA05.nc' ENDCASE file = isafile(file, title = 'Where is '+file+' ?', /lookalldir) IF size(file, /type) NE 7 THEN stop ; dummy = '' cnt = 1 ; ; -1/1 xt plot ; IF key_onearth THEN domdef, 20, 380, -1, 1, 0, gdept[0] $ ELSE domdef, min(glamt), max(glamf), jpj/2-1, jpj/2+1, 0, gdept[0] ; 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, 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, 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, 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 ; ; equatorial plot ; IF key_onearth THEN BEGIN a = abs(gphit[0, *]) yind = where(a EQ min(a)) domdef, 20, 380, yind[0], yind[n_elements(yind)-1] $ , gdept[10 < (jpk-1)], gdept[10 < (jpk-1)], gridtype = 'T', /yindex ENDIF ELSE BEGIN domdef, min(glamt), max(glamf), jpj/2, jpj/2 $ , gdept[10 < (jpk-1)], gdept[10 < (jpk-1)], gridtype = 'T', /yindex 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, 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 ; ; yt plot along the column that contain the largest latitude ; IF key_onearth THEN BEGIN ind = where(gphit EQ max(gphit)) ind = ind[0] MOD jpi domdef, ind, ind, -90, 90, gdept[0], gdept[0], gridtype = 'T', /xindex ENDIF ELSE BEGIN domdef, jpi/2, jpi/2, min(gphit), max(gphif), gdept[0], gdept[0], gridtype = 'T', /xindex 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, zero_data if keyword_set(image) then begin saveimage, 'tst_pltt_zero_'+image+'_'+string(cnt, format = '(i2.2)')+'.png', /png ENDIF cnt = cnt + 1 end