source: trunk/MESOSCALE/LMD_MM_MARS/SIMU/RUN/vert_level/levspe.pro @ 212

Last change on this file since 212 was 11, checked in by aslmd, 14 years ago

spiga@svn-planeto:ajoute le modele meso-echelle martien

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