1 | pro gravitwave |
---|
2 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
---|
3 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
---|
4 | file='../EN_COURS/gw/ok_hires_wrfout_d01_9999-09-09_09:00:00_z' |
---|
5 | file='../EN_COURS/gw/_wrfout_d01_9999-09-09_09:00:00_z' |
---|
6 | file='../OUTILS_CONVERSION/wrfout_d01_9999-09-09_09:00:00_z' |
---|
7 | charvar='W' & charvarc='W' |
---|
8 | charvar='tk' & charvarc='W' |
---|
9 | charvar='tk' & charvarc='W' & cond=1 |
---|
10 | ;charvar='tpot' & charvarc='tpot' |
---|
11 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
---|
12 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
---|
13 | ; |
---|
14 | ; |
---|
15 | ; |
---|
16 | what_I_plot=0. & overcontour=0. |
---|
17 | SPAWN, '\rm param_plot.idl ; cp gravitwave_inc.pro param_plot.idl' |
---|
18 | ; |
---|
19 | ; |
---|
20 | ; |
---|
21 | getcdf, $ |
---|
22 | file=file, $ |
---|
23 | charvar=charvar, $ |
---|
24 | invar=invar |
---|
25 | getcdf, $ |
---|
26 | file=file, $ |
---|
27 | charvar=charvarc, $ |
---|
28 | invar=invarc |
---|
29 | getcdf, $ |
---|
30 | file=file, $ |
---|
31 | charvar='vert', $ |
---|
32 | invar=vert |
---|
33 | getcdf, $ |
---|
34 | file=file, $ |
---|
35 | charvar='PTOT', $ |
---|
36 | invar=columnp |
---|
37 | ; |
---|
38 | ; |
---|
39 | ; |
---|
40 | for nt=1,10 do begin |
---|
41 | zefile='gravitwave_'+charvar+'_'+charvarc+'_'+string(nt+100,'(I0)') |
---|
42 | if (n_elements(cond) ne 0) then zefile = 'cond_' + zefile |
---|
43 | ; |
---|
44 | ; |
---|
45 | ; |
---|
46 | PS_Start, filename=zefile+'.ps' |
---|
47 | print, zefile+'.ps' |
---|
48 | !P.Charsize = 1.2 |
---|
49 | !p.charthick = 2.0 |
---|
50 | !p.thick = 2.0 |
---|
51 | !x.thick = 2.0 |
---|
52 | !y.thick = 2.0 |
---|
53 | ; |
---|
54 | ; |
---|
55 | ; |
---|
56 | what_I_plot = reform(invar(*,1,*,nt)) |
---|
57 | |
---|
58 | |
---|
59 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
---|
60 | file='../LMD_MM_MARS/TESTGW/input_sounding' & header='' & nlines_header=1 & ncol = 5 |
---|
61 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
---|
62 | nlines = FILE_LINES(file)-nlines_header & data=FLTARR(ncol,nlines) |
---|
63 | OPENR, lun, file, /GET_LUN & READF, lun, header & READF, lun, data & CLOSE, lun & FREE_LUN, lun |
---|
64 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
---|
65 | mcd_tpot = reform(data(1,*)) |
---|
66 | mcd_column = reform(data(0,*)) ;& mcd_column = ( mcd_column - mcd_column(0) ) / 1000. |
---|
67 | |
---|
68 | overplot = reform(what_I_plot(30,*)) |
---|
69 | overplot_column = vert/1000. |
---|
70 | what_I_plot = mcd_tpot |
---|
71 | column = mcd_column/1000. |
---|
72 | mention = '' |
---|
73 | ; minfield_init = 0.0001 |
---|
74 | ; maxfield_init = 2000. |
---|
75 | minfield_init = 100. |
---|
76 | maxfield_init = 240. |
---|
77 | alt = [0.,100.] |
---|
78 | SPAWN, '\rm param_plot.idl' |
---|
79 | profile, $ |
---|
80 | what_I_plot, $ ; 1D vertical profile |
---|
81 | column, $ ; altitudes |
---|
82 | alt=alt, $ ; altitude range [altmin, altmax] |
---|
83 | minfield=minfield_init, $ ; minimum value of plotted field (=0: calculate) |
---|
84 | maxfield=maxfield_init, $ ; maximum value of plotted field (=0: calculate) |
---|
85 | inprofile=overplot, $ ; another vertical profile to overplot |
---|
86 | incolumn=overplot_column, $ ; altitudes of the other vertical profile (in case /= column) |
---|
87 | ; discrete=discrete, $ ; show the profile points (= type of points in !psym) |
---|
88 | ; title_plot=title_user, $ ; title of the plot ('Profile' is default) |
---|
89 | ; title_axis=title_axis, $ ; title of the [x,y] axis (['Field','Altitude'] is default) |
---|
90 | mention=mention ; add text precision within the plot window (default is nothing or '') |
---|
91 | |
---|
92 | PS_End, /PNG |
---|
93 | endfor |
---|
94 | end |
---|
95 | |
---|
96 | |
---|
97 | if (charvar eq 'tk') then what_I_plot = what_I_plot - 20. ;; -20. because seasonal variability |
---|
98 | if (n_elements(cond) ne 0) then begin |
---|
99 | column = columnp |
---|
100 | @tempcond.inc |
---|
101 | yeye = reform(overplot(*,1,*,nt)) |
---|
102 | w = where(yeye le 0.) & yeye[w] = 0. |
---|
103 | what_I_plot = what_I_plot - yeye |
---|
104 | endif |
---|
105 | overcontour = reform(invarc(*,1,*,nt)) |
---|
106 | xx = findgen(n_elements(what_I_plot(*,0))) |
---|
107 | zz = vert / 1000. |
---|
108 | ; |
---|
109 | ; |
---|
110 | ; |
---|
111 | map_latlon, $ |
---|
112 | what_I_plot, $ ; 2D field |
---|
113 | xx, $ ; 1D latitude |
---|
114 | zz, $ ; 1D longitude |
---|
115 | ; minfield=minfield_init, $ ; minimum value of plotted field (=0: calculate) |
---|
116 | ; maxfield=maxfield_init, $ ; maximum value of plotted field (=0: calculate) |
---|
117 | overcontour=overcontour, $ ; another 2D field to overplot with contour lines (=0: no) |
---|
118 | ; overvector_x=overvector_x, $ ; wind vector - x component (=0: no) |
---|
119 | ; overvector_y=overvector_y, $ ; wind vector - y component (=0: no) |
---|
120 | ; ct=pal, $ ; color table (33-rainbow is default) |
---|
121 | ; colors=colors, $ ; number of colors/levels (32 is default) |
---|
122 | ; title=title_user, $ ; title of the plot ('' is default) |
---|
123 | format=format ; format of colorbar annotations ('(F6.2)' is default) |
---|
124 | ; |
---|
125 | ; |
---|
126 | ; |
---|
127 | PS_End, /PNG |
---|
128 | endfor |
---|
129 | end |
---|