source: trunk/SRC/Tests/tst_pltz.pro @ 371

Last change on this file since 371 was 371, checked in by pinsard, 16 years ago

improvements of headers (alignments of IDL prompt in examples)

  • Property svn:keywords set to Id
File size: 5.3 KB
Line 
1;+
2;
3; @file_comments
4;
5; @categories
6;
7; @keyword IMAGE
8;
9;
10; @examples
11;
12; To run test with Levitus temperature on a regular 1x1 grid :
13;   IDL> @tst_initlev
14;   IDL> tst_pltz
15;
16; @history
17; Sebastien Masson
18;
19; @version
20; $Id$
21;
22;-
23PRO tst_pltz, IMAGE=image
24;
25  compile_opt idl2, strictarrsubs
26;
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
39  file = isafile(file, title = 'Where is '+file+' ?', /lookalldir)
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;
45  temp = read_ncdf('votemper', 00101, 00131, file = file)
46  IF key_forgetold THEN help, temp.arr ELSE help, temp.tab
47;
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;
90  IF key_onearth THEN BEGIN
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
94  ENDIF ELSE BEGIN
95    domdef, jpi/2, jpi/2, min(gphit), max(gphif), 0, max(gdept), gridtype = 'T', /xindex
96  ENDELSE
97
98  temp = read_ncdf('votemper', 00101, 01231, file = file)
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'
109  temp = read_ncdf('votemper', 00101, 00131, file = file)
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'
120  temp = read_ncdf('votemper', 00101, 00131, file = file)
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;
129  IF (where(gphit EQ 0))[0] NE -1 THEN BEGIN
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'
133    temp = read_ncdf('votemper', 00101, 00131, file = file)
134    pltz, temp, boxzoom = [6000], /portrait, small = [1, 2, 1] $
135          , zoom = 500, zratio = .5
136
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'
140    temp = read_ncdf('votemper', 00101, 00131, file = file)
141    pltz, temp, endpoints = endpoints, boxzoom = [6000] $
142          , zoom = 500, zratio = .5 $
143          , small = [1, 2, 2], /noerase
144
145    if keyword_set(image) then saveimage, 'tst_pltz_'+image+'_'+string(cnt, format = '(i2.2)')+'.png', /png
146    cnt = cnt + 1
147  ENDIF
148
149  return
150end
Note: See TracBrowser for help on using the repository browser.