[131] | 1 | ;+ |
---|
[232] | 2 | ; |
---|
[157] | 3 | ; @file_comments |
---|
| 4 | ; |
---|
| 5 | ; @categories |
---|
| 6 | ; |
---|
[131] | 7 | ; @keyword IMAGE |
---|
| 8 | ; |
---|
[368] | 9 | ; @examples |
---|
| 10 | ; |
---|
| 11 | ; To run test with Levitus temperature on a regular 1x1 grid : |
---|
[371] | 12 | ; IDL> @tst_initlev |
---|
| 13 | ; IDL> tst_pltt |
---|
[368] | 14 | ; |
---|
[131] | 15 | ; @history |
---|
| 16 | ; Sebastien Masson |
---|
| 17 | ; |
---|
[157] | 18 | ; @version |
---|
| 19 | ; $Id$ |
---|
[237] | 20 | ; |
---|
[131] | 21 | ;- |
---|
[327] | 22 | PRO tst_pltt, IMAGE=image |
---|
[114] | 23 | ; |
---|
| 24 | compile_opt idl2, strictarrsubs |
---|
| 25 | ; |
---|
[58] | 26 | @cm_4mesh |
---|
| 27 | @cm_4cal |
---|
| 28 | ; |
---|
| 29 | ; figure 2: regular grid |
---|
| 30 | ; |
---|
| 31 | CASE jpi*key_stride[0]+jpj*key_stride[1] OF |
---|
| 32 | 180+148:file = 'Levitus98_1m_01_12_Temperature_Pot_ORCA2.nc' |
---|
| 33 | 360+180:file = 'Levitus98_1m_01_12_Temperature_Pot_1x1.nc' |
---|
| 34 | 720+510:file = 'Levitus98_1m_01_12_Temperature_Pot_ORCA05.nc' |
---|
| 35 | ENDCASE |
---|
[77] | 36 | file = isafile(file, title = 'Where is '+file+' ?', /lookalldir) |
---|
[58] | 37 | IF size(file, /type) NE 7 THEN return |
---|
| 38 | ; |
---|
| 39 | dummy = '' |
---|
| 40 | cnt = 1 |
---|
| 41 | ; |
---|
| 42 | ; -1/1 xt plot |
---|
| 43 | ; |
---|
| 44 | IF key_onearth THEN domdef, 20, 380, -1, 1, 0, gdept[0] $ |
---|
| 45 | ELSE domdef, min(glamt), max(glamf), jpj/2-1, jpj/2+1, 0, gdept[0] |
---|
| 46 | ; |
---|
[77] | 47 | temp = read_ncdf('votemper', 00101, 01231, file = file) |
---|
[58] | 48 | IF key_forgetold THEN help, temp.arr ELSE help, temp.tab |
---|
| 49 | 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' |
---|
| 53 | cnt = cnt + 1 |
---|
| 54 | ; |
---|
| 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' |
---|
| 58 | cnt = cnt + 1 |
---|
| 59 | ; |
---|
| 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' |
---|
| 68 | cnt = cnt + 1 |
---|
| 69 | ; |
---|
| 70 | ; equatorial plot |
---|
| 71 | ; |
---|
[131] | 72 | IF key_onearth THEN BEGIN |
---|
[58] | 73 | a = abs(gphit[0, *]) |
---|
| 74 | yind = where(a EQ min(a)) |
---|
| 75 | domdef, 20, 380, yind[0], yind[n_elements(yind)-1] $ |
---|
| 76 | , gdept[10 < (jpk-1)], gdept[10 < (jpk-1)], gridtype = 'T', /yindex |
---|
[131] | 77 | ENDIF ELSE BEGIN |
---|
[58] | 78 | domdef, min(glamt), max(glamf), jpj/2, jpj/2 $ |
---|
| 79 | , gdept[10 < (jpk-1)], gdept[10 < (jpk-1)], gridtype = 'T', /yindex |
---|
[131] | 80 | ENDELSE |
---|
[77] | 81 | temp = read_ncdf('votemper', 00101, 01231, file = file) |
---|
[58] | 82 | 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' |
---|
| 86 | cnt = cnt + 1 |
---|
| 87 | ; |
---|
| 88 | ; yt plot along the column that contain the largest latitude |
---|
| 89 | ; |
---|
[131] | 90 | IF key_onearth THEN BEGIN |
---|
[58] | 91 | ind = where(gphit EQ max(gphit)) |
---|
| 92 | ind = ind[0] MOD jpi |
---|
| 93 | domdef, ind, ind, -90, 90, gdept[0], gdept[0], gridtype = 'T', /xindex |
---|
[131] | 94 | ENDIF ELSE BEGIN |
---|
[58] | 95 | domdef, jpi/2, jpi/2, min(gphit), max(gphif), gdept[0], gdept[0], gridtype = 'T', /xindex |
---|
[131] | 96 | ENDELSE |
---|
[58] | 97 | |
---|
[77] | 98 | temp = read_ncdf('votemper', 00101, 01231, file = file) |
---|
[58] | 99 | IF key_forgetold THEN help, temp.arr ELSE help, temp.tab |
---|
| 100 | pltt, temp |
---|
| 101 | |
---|
| 102 | if keyword_set(image) then saveimage, 'tst_pltt_'+image+'_'+string(cnt, format = '(i2.2)')+'.png', /png |
---|
| 103 | cnt = cnt + 1 |
---|
| 104 | |
---|
| 105 | return |
---|
| 106 | end |
---|