source: trunk/mesoscale/PLOT/SPEC/GW/gravitwaveprof.pro @ 112

Last change on this file since 112 was 85, checked in by aslmd, 14 years ago

LMD_MM_MARS et LMD_LES_MARS: ajout des routines IDL pour tracer les sorties --> voir mesoscale/PLOT

  • Property svn:executable set to *
File size: 5.9 KB
Line 
1pro gravitwaveprof
2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3
4;
5; faire avant api avec kappa 3.9
6;
7
8;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
9path='../TESTGW/'
10path='/tmp7/aslmd/'
11experiment='mcd_lt16_rcpcst'
12;experiment='mcd_lt16'
13;experiment='short_mcd_lt16_rcpcst'
14;experiment='short_mcd_lt16'
15;experiment='short_mcd_lt16_calcprho'
16;experiment='mcd_lt16_calcprho'
17;experiment='short_mcd_lt16_calcprho_tot'
18;experiment='colder_gcm_add_short'
19;experiment='colder_gcm_add'
20experiment=''
21;experiment='wind15'
22;experiment='wind20c'
23;experiment='colder_gcm_add_3.9_fine_rad_mountain'
24experiment='test'
25file=path+experiment+'_wrfout_d01_9999-09-09_09:00:00_z'
26charvar='W' & charvarc='W'
27charvar='tk' & charvarc='W'
28charvar='tk' & charvarc='W' & cond=1
29charvar='tpot' & charvarc='tpot'
30;charvar='PTOT' & charvarc='PTOT'
31charvar='tk' & charvarc='tk'
32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
33nts=1  & nte=15   & nxs=0   & nxe=59
34nts=3  & nte=nts  & nxs=999 & nxe=999 ;; moyenne ;; attention a la montagne !!!
35nts=4  & nte=nts  & nxs=31  & nxe=nxs ;; AU CENTRE ! sinon choisir le point en traçant de 0a 59
36nts=1  & nte=nts  & nxs=0   & nxe=59
37nts=4  & nte=nts  & nxs=0   & nxe=59
38nts=1  & nte=15   & nxs=31  & nxe=31
39nts=1  & nte=15   & nxs=45  & nxe=45
40nts=9  & nte=9    & nxs=0   & nxe=59
41nts=1  & nte=13   & nxs=59  & nxe=59
42nts=8  & nte=8    & nxs=0   & nxe=121
43nts=1  & nte=9    & nxs=59  & nxe=59
44;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
45;
46;
47;
48what_I_plot=0. & overcontour=0.
49;SPAWN, '\rm param_plot.idl ; cp gravitwave_inc2.pro param_plot.idl'
50;
51;
52;
53getcdf, $
54        file=file, $
55        charvar=charvar, $
56        invar=invar
57getcdf, $
58        file=file, $
59        charvar=charvarc, $
60        invar=invarc
61getcdf, $
62        file=file, $
63        charvar='vert', $
64        invar=vert
65getcdf, $
66        file=file, $
67        charvar='PTOT', $
68        invar=columnp
69;
70;
71;
72for nt=nts,nte do begin
73for nx=nxs,nxe do begin
74;
75zefile=experiment+'_'+charvar+'_'+string(nt+100,'(I0)')+'_'+string(nx+100,'(I0)')
76;
77;
78;
79  PS_Start, filename=zefile+'.ps'
80  print, zefile+'.ps'
81  !P.Charsize = 1.2
82  !p.charthick = 2.0
83  !p.thick = 2.0
84  !x.thick = 2.0
85  !y.thick = 2.0
86;
87;
88;
89;what_I_plot = reform(invar(*,1,*,nt))
90what_I_plot = reform(invar(*,59,*,nt))
91
92   ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
93   file=path+experiment+'/input_sounding' & header='' & nlines_header=1 & ncol = 5
94   ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
95   nlines = FILE_LINES(file)-nlines_header & data=FLTARR(ncol,nlines)
96   OPENR, lun, file, /GET_LUN & READF, lun, header & READF, lun, data & CLOSE, lun & FREE_LUN, lun
97   ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
98   mcd_column      = reform(data(0,*))
99   calc_tpot       = reform(data(1,*))
100
101   ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
102   file=path+experiment+'/input_therm' & ncol = 5
103   ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
104   nlines = FILE_LINES(file) & data=FLTARR(ncol,nlines)
105   OPENR, lun, file, /GET_LUN & READF, lun, data & CLOSE, lun & FREE_LUN, lun
106   ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
107   pressure        = reform(data(2,*))
108   mcd_tpot        = reform(data(4,*))   
109
110   if (nx lt 999) then begin
111     what_I_plot = reform(what_I_plot(nx,*))
112   endif else begin
113     what_I_plot = TOTAL(what_I_plot,1) / n_elements(reform(what_I_plot(*,0)))
114   endelse
115     ;;;;;;;;;;;
116     ;;;;;;;;;;;
117     ;;;;;;;;;;;
118     column = vert/1000.
119     overplot_column = mcd_column/1000.
120     alt = [20.,150.]
121     alt = [40.,100.]
122     alt = [40.,80.]
123        ;hache = 8.
124        ;column = -hache*alog(reform(columnp(nx,1,*,nt))/610.)
125        ;overplot_column = -hache*alog(pressure/610.)
126;column = reform(columnp(nx,1,*,nt))
127;overplot_column = pressure
128;alt = [1.e2,1.e-3]
129;;;; mettre profile en log
130     ;;;;;;;;;;;
131     ;;;;;;;;;;;
132     mention = ''
133     SPAWN, '\rm param_plot.idl'
134     minfield_init = 80.  ;100.
135     maxfield_init = 190. ;250.
136     title_axis = ['Temperature (K)','Altitude (km)']
137;title_axis = ['Temperature (K)','Pressure (Pa)']
138     overplot = mcd_tpot
139     ;;;;;;;;;;;
140
141;; calculer la CAPE ? Tsat - Tenv / Tenv
142
143
144                        ;what_I_plot = pressure
145                        ;       what_I_plot = calc_tpot
146                        ;overplot = alog(overplot) / alog(10.)
147                        ;overplot = overplot[where(overplot lt 35.)] ;; evite les valeurs impossibles
148                        ;what_I_plot = alog(what_I_plot) / alog(10.)
149                        ;minfield_init = -5.
150                        ;maxfield_init = 3.
151                        ;       ;;tpot
152                        ;       minfield_init = 2.
153                        ;       maxfield_init = 4.
154                        ;what_I_plot = 100. * abs(calc_tpot - overplot) / overplot
155                        ;minfield_init = 0.000001
156                        ;maxfield_init = 100.
157
158   profile, $
159        what_I_plot, $                          ; 1D vertical profile
160        column, $                               ; altitudes     
161        alt=alt, $                              ; altitude range [altmin, altmax]
162        minfield=minfield_init, $               ; minimum value of plotted field (=0: calculate)
163        maxfield=maxfield_init, $               ; maximum value of plotted field (=0: calculate)
164        inprofile=overplot, $                   ; another vertical profile to overplot
165        incolumn=overplot_column, $             ; altitudes of the other vertical profile (in case /= column)
166;        discrete=discrete, $                    ; show the profile points (= type of points in !psym)
167;        title_plot=title_user, $                ; title of the plot ('Profile' is default)
168        title_axis=title_axis, $                ; title of the [x,y] axis (['Field','Altitude'] is default)
169        mention=mention                         ; add text precision within the plot window (default is nothing or '')
170
171;;; sponge layer
172;w=where(FINITE(overplot) ne 0)
173;oplot, [minfield_init,maxfield_init], [max(overplot_column[w])-50.,max(overplot_column[w])-50.], linestyle=1
174
175;column = columnp
176;@tempcond.inc
177;yeye = reform(overplot(nx,1,*,nt))
178;;w = where(yeye le 0.) & yeye[w] = !VALUES.F_NAN
179;;oplot, yeye, vert/1000., linestyle=1
180
181@tempcond.inc
182overplot = reform(overplot(nx,1,*,nt))
183oplot, overplot, overplot_column, linestyle=1
184
185;calc_tk = calc_tpot * (pressure/610.)^(1/4.4)
186;oplot, calc_tk, column, linestyle=3
187
188PS_End, /PNG
189endfor
190endfor
191end
Note: See TracBrowser for help on using the repository browser.