source: trunk/SRC/Tests/tst_pltz.pro

Last change on this file was 495, checked in by pinsard, 10 years ago

fix thanks to coding rules; typo; dupe empty lines; trailing blanks

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