source: trunk/SRC/Tests/tst_pltt.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: 3.1 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_pltt
14;
15; @history
16; Sebastien Masson
17;
18; @version
19; $Id$
20;
21;-
22PRO tst_pltt, IMAGE=image
23;
24  compile_opt idl2, strictarrsubs
25;
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
36  file = isafile(file, title = 'Where is '+file+' ?', /lookalldir)
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;
47  temp = read_ncdf('votemper', 00101, 01231, file = file)
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;
72  IF key_onearth THEN BEGIN
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
77  ENDIF ELSE BEGIN
78    domdef, min(glamt), max(glamf), jpj/2, jpj/2 $
79      , gdept[10 < (jpk-1)], gdept[10 < (jpk-1)], gridtype = 'T', /yindex
80  ENDELSE
81  temp = read_ncdf('votemper', 00101, 01231, file = file)
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;
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, gdept[0], gdept[0], gridtype = 'T', /xindex
94  ENDIF ELSE BEGIN
95    domdef, jpi/2, jpi/2, min(gphit), max(gphif), gdept[0], gdept[0], gridtype = 'T', /xindex
96  ENDELSE
97
98  temp = read_ncdf('votemper', 00101, 01231, file = file)
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
106end
Note: See TracBrowser for help on using the repository browser.