doc/app/idl: plot_pr_palm_output.pro

File plot_pr_palm_output.pro, 19.5 KB (added by herbort, 13 years ago)
Line 
1;#######################################################################
2;# Program language: IDL (Interactive Data Language), file-ending .pro #
3;#                                                                     #
4;# This program creates png- or ps-images from netCDF-files generated  #
5;# by PALM. The images show profiles of an available variable.         #
6;#                                                                     #
7;# Remarks:                                                            #
8;#   * Program reads netCDF files ending with *_pr.nc (PALM profiles)  #
9;#   * The input-parameters, that the program requires, have to be     #
10;#     entered in the following section "ENTER PARAMETERS".            #
11;#   * The program creates a .png or .ps image in the current directory#
12;#                                                                     #
13;#                                                   coder: F. Herbort #
14;#######################################################################
15;                                                                      #
16; ENTER PARAMETERS:                                                    #
17; =================                                                    #
18;                                                                      #
19; Host-Identifier:                                                     #
20hostid = 'lcsgih'   ;                                                  #
21;                                                                      #
22; Name of run:                                                         #
23name_of_run = 'example_cbl'   ; sub-folder of                          #
24;                               ~/palm/current_version/JOBS            #
25; Number for restart-files:                                            #
26resnum = ' '   ; (blank if no restart-file is considered)              #
27;                                                                      #
28; Path to netCDF-file:                                                 #
29netcdf_path = '/home/herbort/palm/current_version/JOBS/'+name_of_run+'/OUTPUT/' ;#
30;                                                                      #
31; Point of time [s]:                                                   #
32t_point = 3604   ;                                                     #
33;                                                                      #
34; Chosing desired variables (0 = no, 1 = yes):                         #
35u_yn = 0     ; u-wind component                                        #
36v_yn = 0     ; v-wind component                                        #
37w_yn = 0     ; w-wind component                                        #
38pt_yn = 1    ; potential temperature                                   #
39wpt_yn = 1   ; turbulent heat flux                                     #
40wpptp_yn = 0 ; sub-grid fraction of turb. heat flux (added in plot wpt)#
41wu_yn = 0    ; turbulent flux of momentum                              #
42e_yn = 0     ; turbulent kinetic energy                                #
43us2_yn = 0   ; variance of resolved u-wind component                   #
44vs2_yn = 0   ; variance of resolved v-wind component                   #
45ws2_yn = 0   ; variance of resolved w-wind component                   #
46pts2_yn = 0  ; variance of resolved potential temperature component    #
47;                                                                      #
48; normalized z-axis? (0 = no, 1 = yes):                                #
49norm_yn = 0   ;                                                        #
50;                                                                      #
51; kind of image (.png or .ps):                                         #
52png_yn = 1   ;                                                         #
53ps_yn = 0    ;                                                         #
54;#######################################################################
55
56PRINT, ' '
57PRINT, '==========================================================='
58PRINT, 'Program creates images from netCDF-files generated by PALM.'
59PRINT, 'The images show profiles of different variables.           '
60PRINT, '                                               [F. Herbort]'
61PRINT, '==========================================================='
62PRINT, ' '
63
64;=======================================================================
65; Constants and parameters:
66; -------------------------
67
68kind_data = 'pr'
69
70;=======================================================================
71; Checking existence of file:
72; ---------------------------
73
74IF resnum EQ ' ' THEN datafile = hostid+'_'+name_of_run+'_'+kind_data+'.nc'
75IF resnum NE ' ' THEN datafile = hostid+'_'+name_of_run+'_'+kind_data+'.'+resnum+'.nc'
76input = netcdf_path+datafile
77
78fileyn = FILE_TEST(input)
79
80; Checking, wether filename is without hostid at the beginning of filename:
81IF fileyn EQ 0L THEN BEGIN
82IF resnum EQ ' ' THEN datafile = name_of_run+'_'+kind_data+'.nc'
83IF resnum NE ' ' THEN datafile = name_of_run+'_'+kind_data+'.'+resnum+'.nc'
84input = netcdf_path+datafile
85fileyn = FILE_TEST(input)
86ENDIF
87
88IF fileyn EQ 0L THEN BEGIN
89PRINT, 'netCDF-file does not exist!'
90PRINT, 'Program aborted'
91PRINT, ' '
92GOTO, abort_flag
93ENDIF
94
95;=======================================================================
96; Reading the profile data from netCDF-file:
97; ------------------------------------------
98
99nid = NCDF_OPEN(input)
100
101NCDF_VARGET, nid, 'time', time
102NCDF_VARGET, nid, 'zpt', zu_vals
103NCDF_VARGET, nid, 'zwpt', zw_vals
104IF u_yn NE 0 THEN NCDF_VARGET, nid, 'u', u_wind
105IF v_yn NE 0 THEN NCDF_VARGET, nid, 'v', v_wind
106IF w_yn NE 0 THEN NCDF_VARGET, nid, 'w', w_wind
107IF pt_yn NE 0 THEN NCDF_VARGET, nid, 'pt', pt
108IF wpt_yn NE 0 OR norm_yn NE 0 OR wpptp_yn NE 0 THEN NCDF_VARGET, nid, 'wpt', wpt
109IF wpptp_yn NE 0 THEN NCDF_VARGET, nid, 'w"pt"', wpptp
110IF wu_yn NE 0 THEN NCDF_VARGET, nid, 'wu', wu
111IF e_yn NE 0 THEN NCDF_VARGET, nid, 'e', tke
112IF us2_yn NE 0 THEN NCDF_VARGET, nid, 'u*2', us2
113IF vs2_yn NE 0 THEN NCDF_VARGET, nid, 'v*2', vs2
114IF ws2_yn NE 0 THEN NCDF_VARGET, nid, 'w*2', ws2
115IF pts2_yn NE 0 THEN NCDF_VARGET, nid, 'pt*2', pts2
116
117NCDF_CLOSE, nid
118
119PRINT, 'profile data read in'
120PRINT, ' '
121
122; Determing vertical dimension:
123res = SIZE(zu_vals, /DIMENSION)
124nz = res(0)
125
126;=======================================================================
127; Finding the time point:
128; -----------------------
129
130tt = WHERE(ROUND(time) EQ FIX(t_point))
131
132IF tt(0) EQ -1 THEN tt = WHERE(FIX(t_point) - 1 EQ ROUND(time))
133IF tt(0) EQ -1 THEN tt = WHERE(FIX(t_point) + 1 EQ ROUND(time))
134IF tt(0) EQ -1 THEN tt = WHERE(FIX(t_point) - 2 EQ ROUND(time))
135IF tt(0) EQ -1 THEN tt = WHERE(FIX(t_point) + 2 EQ ROUND(time))
136
137IF tt(0) EQ -1 THEN BEGIN
138PRINT, 'Desired time point not possible!'
139PRINT, 'Program aborted'
140PRINT, ' '
141GOTO, abort_flag
142ENDIF
143
144tt = tt(0)
145
146time_sec = STRING(time(tt), FORMAT = '(I5.5)')
147
148;=======================================================================
149; Plotting the data:
150; ------------------
151
152SET_PLOT, 'Z'
153DEVICE, Z_BUFFERING = 0, SET_RESOLUTION=[1200,900]
154SET_COLORS=256
155
156LOADCT, 0
157TVLCT, R,G,B, /GET
158
159!P.CHARSIZE = 2.3
160!P.CHARTHICK = 2.3
161!X.THICK = 3.0
162!Y.THICK = 3.0
163!X.TICKLEN = 0.025
164!Y.TICKLEN = 0.01
165
166black = 0
167white = 255
168!P.BACKGROUND = white
169
170plot_window = [0.12,0.10,0.96,0.99]
171
172; .ps-preferences, if desired:
173IF ps_yn NE 0 THEN BEGIN
174SET_PLOT, 'PS'
175PRINT, 'Postscript-Format (.ps) selected'
176PRINT, ''
177;Farbeinstellungen, Format etc.:
178;DEVICE, /COLOR, BITS = 8, ENCAPSULATED = 1, /ISOLATIN1, /PORTRAIT
179;DEVICE, FILENAME = plotpath+plotfile+'.eps'
180DEVICE, /COLOR, BITS = 8, ENCAPSULATED = 0, /ISOLATIN1, /LANDSCAPE
181;DEVICE, SCALE_FACTOR = 1.0, XOFFSET = 1.0, YOFFSET = 1.0
182!P.CHARSIZE = 1.5
183!P.CHARTHICK = 1.5
184;plot_window = [0.095,0.225,0.97,0.99]
185ENDIF
186
187; Determining z-axis range of the plot:
188IF norm_yn EQ 0 THEN BEGIN
189!Y.TICKFORMAT = '(I4)'
190zi = 1.0
191
192z_min = 0.0
193z_max = FLOOR(MAX(zw_vals)/100.0)*100.0
194z_inter = 500.0
195z_minor = 5
196z_title = 'altitude [m]'
197ENDIF
198
199IF norm_yn NE 0 THEN BEGIN
200!Y.TICKFORMAT = '(F3.1)'
201wpt_dum = FLTARR(nz)
202wpt_dum = wpt(*,tt)
203
204i_z = WHERE(wpt_dum EQ MIN(wpt_dum))
205i_z = i_z(0)
206
207zi = zw_vals(i_z)
208
209z_min = 0.0
210z_max = FLOOR(MAX(zw_vals / zi)/0.2)*0.2
211z_inter = 0.2
212z_minor = 2
213z_title = 'z/z!Di!N [1]'
214ENDIF
215
216IF u_yn NE 0 THEN BEGIN   ; u
217IF MAX([MAX(u_wind(*,tt)),ABS(MIN(u_wind(*,tt)))]) LE 10.0 THEN BEGIN
218x_max = CEIL(MAX([MAX(u_wind(*,tt)),ABS(MIN(u_wind(*,tt)))])/1.0)*1.0
219;x_min = -x_max
220x_inter = 1.0
221x_minor = 2
222ENDIF
223IF MAX([MAX(u_wind(*,tt)),ABS(MIN(u_wind(*,tt)))]) GT 10.0 THEN BEGIN
224x_max = CEIL(MAX([MAX(u_wind(*,tt)),ABS(MIN(u_wind(*,tt)))])/2.0)*2.0
225;x_min = -x_max
226x_inter = 2.0
227x_minor = 4
228ENDIF
229x_min = -x_max
230
231IF norm_yn EQ 0 THEN plotfile = 'u_'+time_sec+'s_'+name_of_run+'_idl_pr'
232IF norm_yn NE 0 THEN plotfile = 'u_norm_'+time_sec+'s_'+name_of_run+'_idl_pr'
233
234IF ps_yn EQ 1 THEN DEVICE, FILENAME = plotfile+'.ps'
235
236PLOT, u_wind(*,tt), zu_vals/zi, COLOR = black, XRANGE = [x_min,x_max], YRANGE = [z_min,z_max], $
237XMINOR = x_minor, YMINOR = z_minor, XTICKINTERVAL = x_inter, YTICKINTERVAL = z_inter, $
238XTITLE = 'u [m/s]', YTITLE = z_title, POSITION = plot_window, $
239XSTYLE = 1, YSTYLE = 1, LINESTYLE = 0, XTICKFORMAT = '(F5.1)'
240
241PLOTS, [0.0,0.0], [z_min,z_max], COLOR = black, LINESTYLE = 2
242IF norm_yn NE 0 THEN PLOTS, [x_min,x_max], [1.0,1.0], COLOR = black, LINESTYLE = 2
243
244IF png_yn EQ 1 THEN BEGIN
245DATA = TVRD()
246WRITE_PNG, plotfile+'.png', DATA, r, g, b
247PRINT, 'png-image of "u" created'
248;PRINT, ''
249ENDIF
250
251DEVICE, /CLOSE
252ENDIF
253
254IF v_yn NE 0 THEN BEGIN   ; v
255IF MAX([MAX(v_wind(*,tt)),ABS(MIN(v_wind(*,tt)))]) LE 10.0 THEN BEGIN
256x_max = CEIL(MAX([MAX(v_wind(*,tt)),ABS(MIN(v_wind(*,tt)))])/1.0)*1.0
257;x_min = -x_max
258x_inter = 1.0
259x_minor = 2
260ENDIF
261IF MAX([MAX(v_wind(*,tt)),ABS(MIN(v_wind(*,tt)))]) GT 10.0 THEN BEGIN
262x_max = CEIL(MAX([MAX(v_wind(*,tt)),ABS(MIN(v_wind(*,tt)))])/2.0)*2.0
263;x_min = -x_max
264x_inter = 2.0
265x_minor = 4
266ENDIF
267x_min = -x_max
268
269IF norm_yn EQ 0 THEN plotfile = 'v_'+time_sec+'s_'+name_of_run+'_idl_pr'
270IF norm_yn NE 0 THEN plotfile = 'v_norm_'+time_sec+'s_'+name_of_run+'_idl_pr'
271
272IF ps_yn EQ 1 THEN DEVICE, FILENAME = plotfile+'.ps'
273
274PLOT, v_wind(*,tt), zu_vals/zi, COLOR = black, XRANGE = [x_min,x_max], YRANGE = [z_min,z_max], $
275XMINOR = x_minor, YMINOR = z_minor, XTICKINTERVAL = x_inter, YTICKINTERVAL = z_inter, $
276XTITLE = 'v [m/s]', YTITLE = z_title, POSITION = plot_window, $
277XSTYLE = 1, YSTYLE = 1, LINESTYLE = 0, XTICKFORMAT = '(F5.1)'
278
279PLOTS, [0.0,0.0], [z_min,z_max], COLOR = black, LINESTYLE = 2
280IF norm_yn NE 0 THEN PLOTS, [x_min,x_max], [1.0,1.0], COLOR = black, LINESTYLE = 2
281
282IF png_yn EQ 1 THEN BEGIN
283DATA = TVRD()
284WRITE_PNG, plotfile+'.png', DATA, r, g, b
285PRINT, 'png-image of "v" created'
286;PRINT, ''
287ENDIF
288
289DEVICE, /CLOSE
290ENDIF
291
292IF w_yn NE 0 THEN BEGIN   ; w
293IF MAX([MAX(w_wind(*,tt)),ABS(MIN(w_wind(*,tt)))]) LE 10.0 THEN BEGIN
294x_max = CEIL(MAX([MAX(w_wind(*,tt)),ABS(MIN(w_wind(*,tt)))])/1.0)*1.0
295;x_min = -x_max
296x_inter = 1.0
297x_minor = 2
298ENDIF
299IF MAX([MAX(w_wind(*,tt)),ABS(MIN(w_wind(*,tt)))]) GT 10.0 THEN BEGIN
300x_max = CEIL(MAX([MAX(w_wind(*,tt)),ABS(MIN(w_wind(*,tt)))])/2.0)*2.0
301;x_min = -x_max
302x_inter = 2.0
303x_minor = 4
304ENDIF
305x_min = -x_max
306
307IF norm_yn EQ 0 THEN plotfile = 'w_'+time_sec+'s_'+name_of_run+'_idl_pr'
308IF norm_yn NE 0 THEN plotfile = 'w_norm_'+time_sec+'s_'+name_of_run+'_idl_pr'
309
310IF ps_yn EQ 1 THEN DEVICE, FILENAME = plotfile+'.ps'
311
312PLOT, w_wind(*,tt), zw_vals/zi, COLOR = black, XRANGE = [x_min,x_max], YRANGE = [z_min,z_max], $
313XMINOR = x_minor, YMINOR = z_minor, XTICKINTERVAL = x_inter, YTICKINTERVAL = z_inter, $
314XTITLE = 'w [m/s]', YTITLE = z_title, POSITION = plot_window, $
315XSTYLE = 1, YSTYLE = 1, LINESTYLE = 0, XTICKFORMAT = '(F4.1)'
316
317PLOTS, [0.0,0.0], [z_min,z_max], COLOR = black, LINESTYLE = 2
318IF norm_yn NE 0 THEN PLOTS, [x_min,x_max], [1.0,1.0], COLOR = black, LINESTYLE = 2
319
320IF png_yn EQ 1 THEN BEGIN
321DATA = TVRD()
322WRITE_PNG, plotfile+'.png', DATA, r, g, b
323PRINT, 'png-image of "w" created'
324;PRINT, ''
325ENDIF
326
327DEVICE, /CLOSE
328ENDIF
329
330IF pt_yn NE 0 THEN BEGIN   ; pt
331x_min = FLOOR(MIN(pt(*,tt))/1.0)*1.0
332x_max = CEIL(MAX(pt(*,tt))/1.0)*1.0
333x_inter = 2.0
334x_minor = 4
335
336IF norm_yn EQ 0 THEN plotfile = 'pt_'+time_sec+'s_'+name_of_run+'_idl_pr'
337IF norm_yn NE 0 THEN plotfile = 'pt_norm_'+time_sec+'s_'+name_of_run+'_idl_pr'
338
339IF ps_yn EQ 1 THEN DEVICE, FILENAME = plotfile+'.ps'
340
341PLOT, pt(*,tt), zu_vals/zi, COLOR = black, XRANGE = [x_min,x_max], YRANGE = [z_min,z_max], $
342XMINOR = x_minor, YMINOR = z_minor, XTICKINTERVAL = x_inter, YTICKINTERVAL = z_inter, $
343XTITLE = '!4h!3 [K]', YTITLE = z_title, POSITION = plot_window, $
344XSTYLE = 1, YSTYLE = 1, LINESTYLE = 0, XTICKFORMAT = '(I3)'
345
346IF norm_yn NE 0 THEN PLOTS, [x_min,x_max], [1.0,1.0], COLOR = black, LINESTYLE = 2
347
348IF png_yn EQ 1 THEN BEGIN
349DATA = TVRD()
350WRITE_PNG, plotfile+'.png', DATA, r, g, b
351PRINT, 'png-image of "pt" created'
352;PRINT, ''
353ENDIF
354
355DEVICE, /CLOSE
356ENDIF
357
358IF wpt_yn NE 0 OR wpptp_yn NE 0 THEN BEGIN   ; wpt
359x_min = FLOOR(MIN(wpt(*,tt))/0.02)*0.02
360x_max = CEIL(MAX(wpt(*,tt))/0.02)*0.02
361x_inter = 0.02
362x_minor = 2
363
364IF norm_yn EQ 0 THEN plotfile = 'wpt_'+time_sec+'s_'+name_of_run+'_idl_pr'
365IF norm_yn NE 0 THEN plotfile = 'wpt_norm_'+time_sec+'s_'+name_of_run+'_idl_pr'
366
367IF ps_yn EQ 1 THEN DEVICE, FILENAME = plotfile+'.ps'
368
369PLOT, wpt(*,tt), zw_vals/zi, COLOR = black, XRANGE = [x_min,x_max], YRANGE = [z_min,z_max], $
370XMINOR = x_minor, YMINOR = z_minor, XTICKINTERVAL = x_inter, YTICKINTERVAL = z_inter, $
371XTITLE = 'w!4h!3 [Km/s]', YTITLE = z_title, POSITION = plot_window, $
372XSTYLE = 1, YSTYLE = 1, LINESTYLE = 0, XTICKFORMAT = '(F5.2)'
373
374IF wpptp_yn NE 0 THEN OPLOT, wpptp(*,tt), zw_vals/zi, COLOR = black, LINESTYLE = 1
375
376PLOTS, [0.0,0.0], [z_min,z_max], COLOR = black, LINESTYLE = 2
377IF norm_yn NE 0 THEN PLOTS, [x_min,x_max], [1.0,1.0], COLOR = black, LINESTYLE = 2
378
379IF png_yn EQ 1 THEN BEGIN
380DATA = TVRD()
381WRITE_PNG, plotfile+'.png', DATA, r, g, b
382PRINT, 'png-image of "wpt" created'
383;PRINT, ''
384ENDIF
385
386DEVICE, /CLOSE
387ENDIF
388
389IF wu_yn NE 0 THEN BEGIN   ; wu
390x_min = FLOOR(MIN(wu(*,tt))/0.01)*0.01
391x_max = CEIL(MAX(wu(*,tt))/0.01)*0.01
392x_inter = 0.01
393x_minor = 2
394
395IF norm_yn EQ 0 THEN plotfile = 'wu_'+time_sec+'s_'+name_of_run+'_idl_pr'
396IF norm_yn NE 0 THEN plotfile = 'wu_norm_'+time_sec+'s_'+name_of_run+'_idl_pr'
397
398IF ps_yn EQ 1 THEN DEVICE, FILENAME = plotfile+'.ps'
399
400PLOT, wu(*,tt), zw_vals/zi, COLOR = black, XRANGE = [x_min,x_max], YRANGE = [z_min,z_max], $
401XMINOR = x_minor, YMINOR = z_minor, XTICKINTERVAL = x_inter, YTICKINTERVAL = z_inter, $
402XTITLE = 'wu [m!U2!N/s!U2!N]', YTITLE = z_title, POSITION = plot_window, $
403XSTYLE = 1, YSTYLE = 1, LINESTYLE = 0, XTICKFORMAT = '(F5.2)'
404
405PLOTS, [0.0,0.0], [z_min,z_max], COLOR = black, LINESTYLE = 2
406IF norm_yn NE 0 THEN PLOTS, [x_min,x_max], [1.0,1.0], COLOR = black, LINESTYLE = 2
407
408IF png_yn EQ 1 THEN BEGIN
409DATA = TVRD()
410WRITE_PNG, plotfile+'.png', DATA, r, g, b
411PRINT, 'png-image of "wu" created'
412;PRINT, ''
413ENDIF
414
415DEVICE, /CLOSE
416ENDIF
417
418IF e_yn NE 0 THEN BEGIN   ; e
419x_min = FLOOR(MIN(tke(*,tt))/0.1)*0.1
420x_max = CEIL(MAX(tke(*,tt))/0.1)*0.1
421x_inter = 0.1
422x_minor = 2
423
424IF norm_yn EQ 0 THEN plotfile = 'e_'+time_sec+'s_'+name_of_run+'_idl_pr'
425IF norm_yn NE 0 THEN plotfile = 'e_norm_'+time_sec+'s_'+name_of_run+'_idl_pr'
426
427IF ps_yn EQ 1 THEN DEVICE, FILENAME = plotfile+'.ps'
428
429PLOT, tke(*,tt), zu_vals/zi, COLOR = black, XRANGE = [x_min,x_max], YRANGE = [z_min,z_max], $
430XMINOR = x_minor, YMINOR = z_minor, XTICKINTERVAL = x_inter, YTICKINTERVAL = z_inter, $
431XTITLE = 'e [m!U2!N/s!U2!N]', YTITLE = z_title, POSITION = plot_window, $
432XSTYLE = 1, YSTYLE = 1, LINESTYLE = 0, XTICKFORMAT = '(F3.1)'
433
434IF norm_yn NE 0 THEN PLOTS, [x_min,x_max], [1.0,1.0], COLOR = black, LINESTYLE = 2
435
436IF png_yn EQ 1 THEN BEGIN
437DATA = TVRD()
438WRITE_PNG, plotfile+'.png', DATA, r, g, b
439PRINT, 'png-image of "e" created'
440;PRINT, ''
441ENDIF
442
443DEVICE, /CLOSE
444ENDIF
445
446IF us2_yn NE 0 THEN BEGIN   ; u*2
447IF MAX(us2(*,tt)) LE 3.0 THEN BEGIN
448x_min = FLOOR(MIN(us2(*,tt))/0.2)*0.2
449x_max = CEIL(MAX(us2(*,tt))/0.2)*0.2
450x_inter = 0.2
451x_minor = 2
452ENDIF
453IF MAX(us2(*,tt)) GT 3.0 THEN BEGIN
454x_min = FLOOR(MIN(us2(*,tt))/0.5)*0.5
455x_max = CEIL(MAX(us2(*,tt))/0.5)*0.5
456x_inter = 0.5
457x_minor = 5
458ENDIF
459
460IF norm_yn EQ 0 THEN plotfile = 'us2_'+time_sec+'s_'+name_of_run+'_idl_pr'
461IF norm_yn NE 0 THEN plotfile = 'us2_norm_'+time_sec+'s_'+name_of_run+'_idl_pr'
462
463IF ps_yn EQ 1 THEN DEVICE, FILENAME = plotfile+'.ps'
464
465PLOT, us2(*,tt), zu_vals/zi, COLOR = black, XRANGE = [x_min,x_max], YRANGE = [z_min,z_max], $
466XMINOR = x_minor, YMINOR = z_minor, XTICKINTERVAL = x_inter, YTICKINTERVAL = z_inter, $
467XTITLE = 'u*!U2!N [m!U2!N/s!U2!N]', YTITLE = z_title, POSITION = plot_window, $
468XSTYLE = 1, YSTYLE = 1, LINESTYLE = 0, XTICKFORMAT = '(F3.1)'
469
470IF norm_yn NE 0 THEN PLOTS, [x_min,x_max], [1.0,1.0], COLOR = black, LINESTYLE = 2
471
472IF png_yn EQ 1 THEN BEGIN
473DATA = TVRD()
474WRITE_PNG, plotfile+'.png', DATA, r, g, b
475PRINT, 'png-image of "u*2" created'
476;PRINT, ''
477ENDIF
478
479DEVICE, /CLOSE
480ENDIF
481
482IF vs2_yn NE 0 THEN BEGIN   ; v*2
483IF MAX(vs2(*,tt)) LE 3.0 THEN BEGIN
484x_min = FLOOR(MIN(vs2(*,tt))/0.2)*0.2
485x_max = CEIL(MAX(vs2(*,tt))/0.2)*0.2
486x_inter = 0.2
487x_minor = 2
488ENDIF
489IF MAX(vs2(*,tt)) GT 3.0 THEN BEGIN
490x_min = FLOOR(MIN(vs2(*,tt))/0.5)*0.5
491x_max = CEIL(MAX(vs2(*,tt))/0.5)*0.5
492x_inter = 0.5
493x_minor = 2
494ENDIF
495
496IF norm_yn EQ 0 THEN plotfile = 'vs2_'+time_sec+'s_'+name_of_run+'_idl_pr'
497IF norm_yn NE 0 THEN plotfile = 'vs2_norm_'+time_sec+'s_'+name_of_run+'_idl_pr'
498
499IF ps_yn EQ 1 THEN DEVICE, FILENAME = plotfile+'.ps'
500
501PLOT, vs2(*,tt), zu_vals/zi, COLOR = black, XRANGE = [x_min,x_max], YRANGE = [z_min,z_max], $
502XMINOR = x_minor, YMINOR = z_minor, XTICKINTERVAL = x_inter, YTICKINTERVAL = z_inter, $
503XTITLE = 'v*!U2!N [m!U2!N/s!U2!N]', YTITLE = z_title, POSITION = plot_window, $
504XSTYLE = 1, YSTYLE = 1, LINESTYLE = 0, XTICKFORMAT = '(F3.1)'
505
506IF norm_yn NE 0 THEN PLOTS, [x_min,x_max], [1.0,1.0], COLOR = black, LINESTYLE = 2
507
508IF png_yn EQ 1 THEN BEGIN
509DATA = TVRD()
510WRITE_PNG, plotfile+'.png', DATA, r, g, b
511PRINT, 'png-image of "v*2" created'
512;PRINT, ''
513ENDIF
514
515DEVICE, /CLOSE
516ENDIF
517
518IF ws2_yn NE 0 THEN BEGIN   ; w*2
519x_min = FLOOR(MIN(ws2(*,tt))/0.2)*0.2
520x_max = CEIL(MAX(ws2(*,tt))/0.2)*0.2
521x_inter = 0.2
522x_minor = 2
523
524IF norm_yn EQ 0 THEN plotfile = 'ws2_'+time_sec+'s_'+name_of_run+'_idl_pr'
525IF norm_yn NE 0 THEN plotfile = 'ws2_norm_'+time_sec+'s_'+name_of_run+'_idl_pr'
526
527IF ps_yn EQ 1 THEN DEVICE, FILENAME = plotfile+'.ps'
528
529PLOT, ws2(*,tt), zw_vals/zi, COLOR = black, XRANGE = [x_min,x_max], YRANGE = [z_min,z_max], $
530XMINOR = x_minor, YMINOR = z_minor, XTICKINTERVAL = x_inter, YTICKINTERVAL = z_inter, $
531XTITLE = 'w*!U2!N [m!U2!N/s!U2!N]', YTITLE = z_title, POSITION = plot_window, $
532XSTYLE = 1, YSTYLE = 1, LINESTYLE = 0, XTICKFORMAT = '(F3.1)'
533
534IF norm_yn NE 0 THEN PLOTS, [x_min,x_max], [1.0,1.0], COLOR = black, LINESTYLE = 2
535
536IF png_yn EQ 1 THEN BEGIN
537DATA = TVRD()
538WRITE_PNG, plotfile+'.png', DATA, r, g, b
539PRINT, 'png-image of "w*2" created'
540;PRINT, ''
541ENDIF
542
543DEVICE, /CLOSE
544ENDIF
545
546IF pts2_yn NE 0 THEN BEGIN   ; pt*2
547x_min = FLOOR(MIN(pts2(*,tt))/0.1)*0.1
548x_max = CEIL(MAX(pts2(*,tt))/0.1)*0.1
549x_inter = 0.1
550x_minor = 2
551
552IF norm_yn EQ 0 THEN plotfile = 'pts2_'+time_sec+'s_'+name_of_run+'_idl_pr'
553IF norm_yn NE 0 THEN plotfile = 'pts2_norm_'+time_sec+'s_'+name_of_run+'_idl_pr'
554
555IF ps_yn EQ 1 THEN DEVICE, FILENAME = plotfile+'.ps'
556
557PLOT, pts2(*,tt), zu_vals/zi, COLOR = black, XRANGE = [x_min,x_max], YRANGE = [z_min,z_max], $
558XMINOR = x_minor, YMINOR = z_minor, XTICKINTERVAL = x_inter, YTICKINTERVAL = z_inter, $
559XTITLE = '!4h!3*!U2!N [Km/s]', YTITLE = z_title, POSITION = plot_window, $
560XSTYLE = 1, YSTYLE = 1, LINESTYLE = 0, XTICKFORMAT = '(F3.1)'
561
562IF norm_yn NE 0 THEN PLOTS, [x_min,x_max], [1.0,1.0], COLOR = black, LINESTYLE = 2
563
564IF png_yn EQ 1 THEN BEGIN
565DATA = TVRD()
566WRITE_PNG, plotfile+'.png', DATA, r, g, b
567PRINT, 'png-image of "pt*2" created'
568;PRINT, ''
569ENDIF
570
571DEVICE, /CLOSE
572ENDIF
573
574PRINT, ' '
575PRINT, 'Program finished'
576abort_flag:
577PRINT, ' '
578
579
580END