1 | pro levspe |
---|
2 | |
---|
3 | |
---|
4 | ; |
---|
5 | ; TWEAK PARAM |
---|
6 | ; |
---|
7 | @param.idl |
---|
8 | |
---|
9 | |
---|
10 | ; |
---|
11 | ; HARD PARAM |
---|
12 | ; |
---|
13 | !p.multi=[0,2,2] |
---|
14 | ;!p.multi=[0,1,4] |
---|
15 | |
---|
16 | !p.charthick = 2.0 |
---|
17 | !p.thick = 5.0 |
---|
18 | !x.thick = 2.0 |
---|
19 | !y.thick = 2.0 |
---|
20 | |
---|
21 | |
---|
22 | |
---|
23 | set_plot, 'ps' |
---|
24 | device, file='plot.ps' ;, /landscape |
---|
25 | |
---|
26 | tinv=10 ;; intervalle plot |
---|
27 | hache=10. ;; scale height |
---|
28 | psurf=610. ;; pression surface -- ne change pas les eta levels |
---|
29 | |
---|
30 | ; |
---|
31 | ; PRELIM |
---|
32 | ; |
---|
33 | param = 'e_vert='+string(nlev,'(I0)')+' ztop='+string(altmax,'(I0)')+' e='+string(epsilon,'(I0)')+' c='+string(elong_cos,'(F4.2)') |
---|
34 | ; |
---|
35 | epsilon = epsilon / (nlev-1) / 100. |
---|
36 | ; |
---|
37 | exposant = !pi/nlev/elong_cos |
---|
38 | ; |
---|
39 | ; alpha (plus grand ecart en km) est determine pour que max(altitudes)=altmax |
---|
40 | ; |
---|
41 | alpha = altmax / ( (nlev-1)/2. - sin(2.*exposant*(nlev-1))/4./exposant + epsilon*(nlev-1)^2/2. ) |
---|
42 | print, 'alpha (km)', alpha |
---|
43 | ; |
---|
44 | x=[findgen(nlev)] |
---|
45 | |
---|
46 | |
---|
47 | ; |
---|
48 | ; CALC |
---|
49 | ; |
---|
50 | ecart = alpha - alpha*cos(exposant*x)^2 + epsilon*alpha*x |
---|
51 | altitudes = alpha*x/2. - alpha*sin(2.*exposant*x)/4./exposant + epsilon*alpha*x^2/2. |
---|
52 | logpressions = alog(psurf) - altitudes/hache |
---|
53 | pressions=exp(logpressions) |
---|
54 | ptop=psurf*exp(-altmax/hache) & print, ptop |
---|
55 | etas=(pressions-ptop)/(psurf-ptop) |
---|
56 | etas(nlev-1)=0. |
---|
57 | |
---|
58 | |
---|
59 | ; |
---|
60 | ; PRINT |
---|
61 | ; |
---|
62 | print, 'eta levels' |
---|
63 | print, etas |
---|
64 | ; |
---|
65 | print, 'pressure' |
---|
66 | pi=etas*(psurf-ptop)+ptop |
---|
67 | print, pi |
---|
68 | print, 'ptop', ptop |
---|
69 | ; |
---|
70 | print, 'pseudo-altitude' |
---|
71 | pseudo=10.*alog(610./pi) |
---|
72 | print, 1000.*10.*alog(610./pi) |
---|
73 | |
---|
74 | |
---|
75 | ; |
---|
76 | ; PLOT |
---|
77 | ; |
---|
78 | ;plot, x, etas, title='ETA '+param, xtickinterval=tinv |
---|
79 | plot, x, etas, title='ETA LEVELS', xtickinterval=tinv, psym=3 |
---|
80 | ;!psym=3 & oplot, x, etas |
---|
81 | ;!psym=0 |
---|
82 | plot, x, pseudo, title='ALTITUDE (km)', xtickinterval=tinv, psym=3 |
---|
83 | ;!psym=3 & oplot, x, pseudo |
---|
84 | ;!psym=0 |
---|
85 | plot, x, pi, title='PRESSURE (Pa)', ylog=1, xtickinterval=tinv, psym=3 |
---|
86 | ;!psym=3 & oplot, x, pi |
---|
87 | ;!psym=0 |
---|
88 | ; |
---|
89 | diff=pseudo - shift(pseudo,-1) & diff=-diff(0:nlev-2) |
---|
90 | ; |
---|
91 | ;plot, x, ecart, title='ECART (km, L=theor x=calc)', xtickinterval=tinv |
---|
92 | ;plot, x, ecart, title='d ALTITUDE (km)', xtickinterval=tinv, psym=1 |
---|
93 | plot, x, diff, title='d ALTITUDE (km)', xtickinterval=tinv, psym=3 |
---|
94 | ;!psym=3 & oplot, x, diff |
---|
95 | ;!psym=0 |
---|
96 | |
---|
97 | |
---|
98 | ; |
---|
99 | ; PRINT |
---|
100 | ; |
---|
101 | openw, 1, 'levels' |
---|
102 | for i=0, nlev-1 do begin |
---|
103 | printf, 1, etas(i);,',' |
---|
104 | endfor |
---|
105 | close, 1 |
---|
106 | |
---|
107 | end |
---|