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
RevLine 
[131]1;+
[232]2;
[157]3; @file_comments
4;
5; @categories
6;
[131]7; @keyword IMAGE
[157]8;
[368]9; @examples
10;
11; To run test with Levitus temperature on a regular 1x1 grid :
[371]12;   IDL> @tst_initlev
13;   IDL> tst_pltz
[368]14;
[131]15; @history
16; Sebastien Masson
17;
[157]18; @version
19; $Id$
[237]20;
[131]21;-
[327]22PRO tst_pltz, IMAGE=image
[114]23;
24  compile_opt idl2, strictarrsubs
25;
[58]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
[77]38  file = isafile(file, title = 'Where is '+file+' ?', /lookalldir)
[58]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;
[77]44  temp = read_ncdf('votemper', 00101, 00131, file = file)
[58]45  IF key_forgetold THEN help, temp.arr ELSE help, temp.tab
[131]46;
[58]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;
[131]89  IF key_onearth THEN BEGIN
[58]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
[131]93  ENDIF ELSE BEGIN
[58]94    domdef, jpi/2, jpi/2, min(gphit), max(gphif), 0, max(gdept), gridtype = 'T', /xindex
[131]95  ENDELSE
[58]96
[77]97  temp = read_ncdf('votemper', 00101, 01231, file = file)
[58]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'
[77]108  temp = read_ncdf('votemper', 00101, 00131, file = file)
[58]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'
[77]119  temp = read_ncdf('votemper', 00101, 00131, file = file)
[58]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;
[131]128  IF (where(gphit EQ 0))[0] NE -1 THEN BEGIN
[58]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'
[77]132    temp = read_ncdf('votemper', 00101, 00131, file = file)
[58]133    pltz, temp, boxzoom = [6000], /portrait, small = [1, 2, 1] $
134          , zoom = 500, zratio = .5
[131]135
[58]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'
[77]139    temp = read_ncdf('votemper', 00101, 00131, file = file)
[58]140    pltz, temp, endpoints = endpoints, boxzoom = [6000] $
141          , zoom = 500, zratio = .5 $
142          , small = [1, 2, 2], /noerase
[131]143
[58]144    if keyword_set(image) then saveimage, 'tst_pltz_'+image+'_'+string(cnt, format = '(i2.2)')+'.png', /png
145    cnt = cnt + 1
[131]146  ENDIF
147
[58]148  return
149end
Note: See TracBrowser for help on using the repository browser.