[131] | 1 | ;+ |
---|
[232] | 2 | ; |
---|
[157] | 3 | ; @file_comments |
---|
| 4 | ; |
---|
| 5 | ; @categories |
---|
| 6 | ; |
---|
[131] | 7 | ; @keyword IMAGE |
---|
[157] | 8 | ; |
---|
[368] | 9 | ; |
---|
| 10 | ; @examples |
---|
| 11 | ; |
---|
| 12 | ; To run test with Levitus temperature on a regular 1x1 grid : |
---|
[371] | 13 | ; IDL> @tst_initlev |
---|
| 14 | ; IDL> tst_pltz |
---|
[368] | 15 | ; |
---|
[131] | 16 | ; @history |
---|
| 17 | ; Sebastien Masson |
---|
| 18 | ; |
---|
[157] | 19 | ; @version |
---|
| 20 | ; $Id$ |
---|
[237] | 21 | ; |
---|
[131] | 22 | ;- |
---|
[327] | 23 | PRO tst_pltz, IMAGE=image |
---|
[114] | 24 | ; |
---|
| 25 | compile_opt idl2, strictarrsubs |
---|
| 26 | ; |
---|
[58] | 27 | @cm_4mesh |
---|
| 28 | ; |
---|
| 29 | IF jpk EQ 1 THEN return |
---|
| 30 | ; |
---|
| 31 | dummy = '' |
---|
| 32 | cnt = 1 |
---|
| 33 | ; |
---|
| 34 | CASE jpi*key_stride[0]+jpj*key_stride[1] OF |
---|
| 35 | 180+148:file = 'Levitus98_1m_01_12_Temperature_Pot_ORCA2.nc' |
---|
| 36 | 360+180:file = 'Levitus98_1m_01_12_Temperature_Pot_1x1.nc' |
---|
| 37 | 720+510:file = 'Levitus98_1m_01_12_Temperature_Pot_ORCA05.nc' |
---|
| 38 | ENDCASE |
---|
[77] | 39 | file = isafile(file, title = 'Where is '+file+' ?', /lookalldir) |
---|
[58] | 40 | IF size(file, /type) NE 7 THEN return |
---|
| 41 | ; |
---|
| 42 | IF key_onearth THEN domdef, 20, 380, -1, 1, 0, max(gdept) $ |
---|
| 43 | ELSE domdef, min(glamt), max(glamf), jpj/2-1, jpj/2+1, 0, max(gdept) |
---|
| 44 | ; |
---|
[77] | 45 | temp = read_ncdf('votemper', 00101, 00131, file = file) |
---|
[58] | 46 | IF key_forgetold THEN help, temp.arr ELSE help, temp.tab |
---|
[131] | 47 | ; |
---|
[58] | 48 | pltz, temp, /portrait |
---|
| 49 | if keyword_set(image) then saveimage, 'tst_pltz_'+image+'_'+string(cnt, format = '(i2.2)')+'.png', /png $ |
---|
| 50 | ELSE read, dummy, prompt = 'press return for the next plot' |
---|
| 51 | cnt = cnt + 1 |
---|
| 52 | ; |
---|
| 53 | pltz, temp, /portrait, /nocontour |
---|
| 54 | if keyword_set(image) then saveimage, 'tst_pltz_'+image+'_'+string(cnt, format = '(i2.2)')+'.png', /png $ |
---|
| 55 | ELSE read, dummy, prompt = 'press return for the next plot' |
---|
| 56 | cnt = cnt + 1 |
---|
| 57 | ; |
---|
| 58 | pltz, temp, /portrait, /color_c |
---|
| 59 | if keyword_set(image) then saveimage, 'tst_pltz_'+image+'_'+string(cnt, format = '(i2.2)')+'.png', /png $ |
---|
| 60 | ELSE read, dummy, prompt = 'press return for the next plot' |
---|
| 61 | cnt = cnt + 1 |
---|
| 62 | ; |
---|
| 63 | pltz, temp, /portrait, /nofill |
---|
| 64 | if keyword_set(image) then saveimage, 'tst_pltz_'+image+'_'+string(cnt, format = '(i2.2)')+'.png', /png $ |
---|
| 65 | ELSE read, dummy, prompt = 'press return for the next plot' |
---|
| 66 | cnt = cnt + 1 |
---|
| 67 | ; |
---|
| 68 | pltz, temp, boxzoom = [6000] |
---|
| 69 | if keyword_set(image) then saveimage, 'tst_pltz_'+image+'_'+string(cnt, format = '(i2.2)')+'.png', /png $ |
---|
| 70 | ELSE read, dummy, prompt = 'press return for the next plot' |
---|
| 71 | cnt = cnt + 1 |
---|
| 72 | ; |
---|
| 73 | pltz, temp, boxzoom = [6000], zoom = 1000 |
---|
| 74 | if keyword_set(image) then saveimage, 'tst_pltz_'+image+'_'+string(cnt, format = '(i2.2)')+'.png', /png $ |
---|
| 75 | ELSE read, dummy, prompt = 'press return for the next plot' |
---|
| 76 | cnt = cnt + 1 |
---|
| 77 | ; |
---|
| 78 | pltz, temp, boxzoom = [6000], zoom = 1000, yxaspect = 2 |
---|
| 79 | if keyword_set(image) then saveimage, 'tst_pltz_'+image+'_'+string(cnt, format = '(i2.2)')+'.png', /png $ |
---|
| 80 | ELSE read, dummy, prompt = 'press return for the next plot' |
---|
| 81 | cnt = cnt + 1 |
---|
| 82 | ; |
---|
| 83 | pltz, temp, boxzoom = [6000], zoom = 1000, yxaspect = 2, zratio = .5 |
---|
| 84 | if keyword_set(image) then saveimage, 'tst_pltz_'+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, 0, max(gdept), gridtype = 'T', /xindex |
---|
[131] | 94 | ENDIF ELSE BEGIN |
---|
[58] | 95 | domdef, jpi/2, jpi/2, min(gphit), max(gphif), 0, max(gdept), gridtype = 'T', /xindex |
---|
[131] | 96 | ENDELSE |
---|
[58] | 97 | |
---|
[77] | 98 | temp = read_ncdf('votemper', 00101, 01231, file = file) |
---|
[58] | 99 | pltz, temp, boxzoom = [6000], zoom = 1000, yxaspect = 2, zratio = .5 |
---|
| 100 | if keyword_set(image) then saveimage, 'tst_pltz_'+image+'_'+string(cnt, format = '(i2.2)')+'.png', /png $ |
---|
| 101 | ELSE read, dummy, prompt = 'press return for the next plot' |
---|
| 102 | cnt = cnt + 1 |
---|
| 103 | ; |
---|
| 104 | ; oblique sections... |
---|
| 105 | ; |
---|
| 106 | IF key_onearth THEN endpoints = [110, -45, 290, 45] $ |
---|
| 107 | ELSE endpoints = [jpi/6, jpj/3, 5*jpi/6, 2*jpj/3] |
---|
| 108 | domdef, endpoints = endpoints, type = 'pltz' |
---|
[77] | 109 | temp = read_ncdf('votemper', 00101, 00131, file = file) |
---|
[58] | 110 | pltz, temp, endpoints = endpoints |
---|
| 111 | if keyword_set(image) then saveimage, 'tst_pltz_'+image+'_'+string(cnt, format = '(i2.2)')+'.png', /png $ |
---|
| 112 | ELSE read, dummy, prompt = 'press return for the next plot' |
---|
| 113 | cnt = cnt + 1 |
---|
| 114 | ; |
---|
| 115 | ; false oblique sections... |
---|
| 116 | ; |
---|
| 117 | IF key_onearth THEN endpoints = [180, -70, 180, 90] $ |
---|
| 118 | ELSE endpoints = [jpi/2+0.25, +0.25, jpi/2+0.25, jpj] |
---|
| 119 | domdef, 6000, endpoints = endpoints, type = 'pltz' |
---|
[77] | 120 | temp = read_ncdf('votemper', 00101, 00131, file = file) |
---|
[58] | 121 | pltz, temp, endpoints = endpoints, boxzoom = [6000] $ |
---|
| 122 | , zoom = 1000, yxaspect = 2, zratio = .5 ; , /showbuild |
---|
| 123 | if keyword_set(image) then saveimage, 'tst_pltz_'+image+'_'+string(cnt, format = '(i2.2)')+'.png', /png $ |
---|
| 124 | ELSE read, dummy, prompt = 'press return for the next plot' |
---|
| 125 | cnt = cnt + 1 |
---|
| 126 | ; |
---|
| 127 | ; comparison between real section and false oblique sections |
---|
| 128 | ; |
---|
[131] | 129 | IF (where(gphit EQ 0))[0] NE -1 THEN BEGIN |
---|
[58] | 130 | IF key_onearth THEN box = [20, 380, 0, 0, 0, 6000] $ |
---|
| 131 | ELSE box = [0, jpi-1, jpj/2, jpj/2, 0, 6000] |
---|
| 132 | domdef, box, gridtype = 'T' |
---|
[77] | 133 | temp = read_ncdf('votemper', 00101, 00131, file = file) |
---|
[58] | 134 | pltz, temp, boxzoom = [6000], /portrait, small = [1, 2, 1] $ |
---|
| 135 | , zoom = 500, zratio = .5 |
---|
[131] | 136 | |
---|
[58] | 137 | IF key_onearth THEN endpoints = [20, 0, 380, 0] $ |
---|
| 138 | ELSE endpoints = [0, jpj/2, jpi-1, jpj/2] |
---|
| 139 | domdef, 6000, endpoints = endpoints, type = 'pltz', gridtype = 'T' |
---|
[77] | 140 | temp = read_ncdf('votemper', 00101, 00131, file = file) |
---|
[58] | 141 | pltz, temp, endpoints = endpoints, boxzoom = [6000] $ |
---|
| 142 | , zoom = 500, zratio = .5 $ |
---|
| 143 | , small = [1, 2, 2], /noerase |
---|
[131] | 144 | |
---|
[58] | 145 | if keyword_set(image) then saveimage, 'tst_pltz_'+image+'_'+string(cnt, format = '(i2.2)')+'.png', /png |
---|
| 146 | cnt = cnt + 1 |
---|
[131] | 147 | ENDIF |
---|
| 148 | |
---|
[58] | 149 | return |
---|
| 150 | end |
---|