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

Last change on this file since 156 was 131, checked in by pinsard, 18 years ago

improvements of ReadWrite/?*.pro header

  • Property svn:keywords set to Id
File size: 5.2 KB
Line 
1;+
2; @keyword IMAGE
3
4; @history
5; Sebastien Masson
6;
7; @version $Id$
8;-
9PRO tst_pltz, IMAGE = image
10; commons
11;
12  compile_opt idl2, strictarrsubs
13;
14@cm_4mesh
15;
16  IF jpk EQ 1 THEN return
17;
18  dummy = ''
19  cnt = 1
20;
21  CASE jpi*key_stride[0]+jpj*key_stride[1] OF
22    180+148:file = 'Levitus98_1m_01_12_Temperature_Pot_ORCA2.nc'
23    360+180:file = 'Levitus98_1m_01_12_Temperature_Pot_1x1.nc'
24    720+510:file = 'Levitus98_1m_01_12_Temperature_Pot_ORCA05.nc'
25  ENDCASE
26  file = isafile(file, title = 'Where is '+file+' ?', /lookalldir)
27  IF size(file, /type) NE 7 THEN return
28;
29  IF key_onearth THEN domdef, 20, 380, -1, 1, 0, max(gdept) $
30  ELSE domdef, min(glamt), max(glamf), jpj/2-1, jpj/2+1, 0, max(gdept)
31;
32  temp = read_ncdf('votemper', 00101, 00131, file = file)
33  IF key_forgetold THEN help, temp.arr ELSE help, temp.tab
34;
35  pltz, temp, /portrait
36  if keyword_set(image) then saveimage, 'tst_pltz_'+image+'_'+string(cnt, format = '(i2.2)')+'.png', /png $
37  ELSE read, dummy,  prompt = 'press return for the next plot'
38  cnt = cnt + 1
39;
40  pltz, temp, /portrait, /nocontour
41  if keyword_set(image) then saveimage, 'tst_pltz_'+image+'_'+string(cnt, format = '(i2.2)')+'.png', /png $
42  ELSE read, dummy,  prompt = 'press return for the next plot'
43  cnt = cnt + 1
44;
45  pltz, temp, /portrait, /color_c
46  if keyword_set(image) then saveimage, 'tst_pltz_'+image+'_'+string(cnt, format = '(i2.2)')+'.png', /png $
47  ELSE read, dummy,  prompt = 'press return for the next plot'
48  cnt = cnt + 1
49;
50  pltz, temp, /portrait, /nofill
51  if keyword_set(image) then saveimage, 'tst_pltz_'+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  pltz, temp, boxzoom = [6000]
56  if keyword_set(image) then saveimage, 'tst_pltz_'+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  pltz, temp, boxzoom = [6000], zoom = 1000
61  if keyword_set(image) then saveimage, 'tst_pltz_'+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  pltz, temp, boxzoom = [6000], zoom = 1000, yxaspect = 2
66  if keyword_set(image) then saveimage, 'tst_pltz_'+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  pltz, temp, boxzoom = [6000], zoom = 1000, yxaspect = 2, zratio = .5
71  if keyword_set(image) then saveimage, 'tst_pltz_'+image+'_'+string(cnt, format = '(i2.2)')+'.png', /png $
72  ELSE read, dummy,  prompt = 'press return for the next plot'
73  cnt = cnt + 1
74;
75; yt plot along the column that contain the largest latitude
76;
77  IF key_onearth THEN BEGIN
78    ind = where(gphit EQ max(gphit))
79    ind = ind[0] MOD jpi
80    domdef, ind, ind, -90, 90, 0, max(gdept), gridtype = 'T', /xindex
81  ENDIF ELSE BEGIN
82    domdef, jpi/2, jpi/2, min(gphit), max(gphif), 0, max(gdept), gridtype = 'T', /xindex
83  ENDELSE
84
85  temp = read_ncdf('votemper', 00101, 01231, file = file)
86  pltz, temp, boxzoom = [6000], zoom = 1000, yxaspect = 2, zratio = .5
87  if keyword_set(image) then saveimage, 'tst_pltz_'+image+'_'+string(cnt, format = '(i2.2)')+'.png', /png $
88  ELSE read, dummy,  prompt = 'press return for the next plot'
89  cnt = cnt + 1
90;
91; oblique sections...
92;
93  IF key_onearth THEN endpoints = [110, -45, 290, 45] $
94  ELSE endpoints = [jpi/6, jpj/3, 5*jpi/6, 2*jpj/3]
95  domdef, endpoints = endpoints, type = 'pltz'
96  temp = read_ncdf('votemper', 00101, 00131, file = file)
97  pltz, temp, endpoints = endpoints
98  if keyword_set(image) then saveimage, 'tst_pltz_'+image+'_'+string(cnt, format = '(i2.2)')+'.png', /png $
99  ELSE read, dummy,  prompt = 'press return for the next plot'
100  cnt = cnt + 1
101;
102; false oblique sections...
103;
104  IF key_onearth THEN endpoints = [180, -70, 180, 90] $
105  ELSE endpoints = [jpi/2+0.25, +0.25, jpi/2+0.25,  jpj]
106  domdef, 6000, endpoints = endpoints, type = 'pltz'
107  temp = read_ncdf('votemper', 00101, 00131, file = file)
108  pltz, temp, endpoints = endpoints, boxzoom = [6000] $
109        , zoom = 1000, yxaspect = 2, zratio = .5 ; , /showbuild
110  if keyword_set(image) then saveimage, 'tst_pltz_'+image+'_'+string(cnt, format = '(i2.2)')+'.png', /png $
111  ELSE read, dummy,  prompt = 'press return for the next plot'
112  cnt = cnt + 1
113;
114; comparison between real section and false oblique sections
115;
116  IF (where(gphit EQ 0))[0] NE -1 THEN BEGIN
117    IF key_onearth THEN box = [20, 380, 0, 0, 0, 6000] $
118    ELSE box = [0, jpi-1, jpj/2, jpj/2, 0, 6000]
119    domdef, box, gridtype = 'T'
120    temp = read_ncdf('votemper', 00101, 00131, file = file)
121    pltz, temp, boxzoom = [6000], /portrait, small = [1, 2, 1] $
122          , zoom = 500, zratio = .5
123
124    IF key_onearth THEN endpoints = [20, 0, 380, 0] $
125    ELSE endpoints = [0, jpj/2, jpi-1, jpj/2]
126    domdef, 6000, endpoints = endpoints, type = 'pltz', gridtype = 'T'
127    temp = read_ncdf('votemper', 00101, 00131, file = file)
128    pltz, temp, endpoints = endpoints, boxzoom = [6000] $
129          , zoom = 500, zratio = .5 $
130          , small = [1, 2, 2], /noerase
131
132    if keyword_set(image) then saveimage, 'tst_pltz_'+image+'_'+string(cnt, format = '(i2.2)')+'.png', /png
133    cnt = cnt + 1
134  ENDIF
135
136  return
137end
Note: See TracBrowser for help on using the repository browser.