source: trunk/MESOSCALE/LMD_MM_MARS/SIMU/RUN/vert_level/simple.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 simple, z_scale
2
3
4nlev=101
5;
6; z-scale doit etre suffisamment bas pour que l avant-dernier niveau soit assez haut
7; mais pas trop sinon instable (il faut avoir des niveaux espaces en haut semble-t-il)
8;
9z_scale = .25
10;z_scale = .15 marche pas (niveaux pas assez espaces en haut ?)
11ptop = 0.2
12npbl = 5
13        ;z_scale = .15
14        ;ptop = 0.05 ;marche pas
15
16z_scale = .20 & ptop = 0.1 & npbl = 6
17z_scale = .25 & ptop = 0.5 & npbl = 6 & nlev=61  ;; HOLDEN NESTS
18
19psurf=610.
20
21pbl = [1.0000,0.9995,0.9980,0.9950,0.9850,0.9700,0.9400,0.9000]
22x=[findgen(nlev)]
23nlev = nlev - npbl + 1
24
25etas=[findgen(nlev)]
26FOR k=0, nlev-1 DO BEGIN
27     etas(k) = (exp(-float(k)/float(nlev-1)/z_scale) - exp(-1./z_scale)) / (1.-exp(-1./z_scale))
28ENDFOR
29etas(nlev-1)=0.
30
31etas = [pbl(0:npbl-1),etas(1:nlev-1)]
32nlev = nlev + npbl - 1
33print, nlev
34
35;pressions = ptop + etas * (psurf-ptop)
36;zzz = 10. * alog ( psurf / pressions )
37;print, zzz
38
39;
40; HARD PARAM
41;
42!p.multi=[0,2,2]
43;set_plot, 'ps'
44;device, file='plot.ps', /landscape
45
46
47
48;
49; PRINT
50;
51print, 'eta levels'
52print, etas
53;
54print, 'pressure'
55pi=etas*(psurf-ptop)+ptop
56print, pi
57print, 'ptop', ptop
58;
59print, 'pseudo-altitude'
60pseudo=10.*alog(610./pi)
61print, 1000.*10.*alog(610./pi)
62
63
64;
65; PLOT
66;
67plot, x, etas, title='ETA', xtickinterval=tinv
68!psym=7 & oplot, x, etas
69!psym=0
70plot, x, pseudo, title='ALTITUDE (km)', xtickinterval=tinv
71!psym=7 & oplot, x, pseudo
72!psym=0
73plot, x, pi, title='PRESSURE (Pa)', ylog=1, xtickinterval=tinv
74!psym=7 & oplot, x, pi
75!psym=0
76;
77diff=pseudo - shift(pseudo,-1) & diff=-diff(0:nlev-2)
78;
79plot, x, diff, title='ECART (km, L=theor x=calc)', xtickinterval=tinv
80!psym=7 & oplot, x, diff
81!psym=0
82
83;stop
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.