1 | pro simple, z_scale |
---|
2 | |
---|
3 | |
---|
4 | nlev=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 | ; |
---|
9 | z_scale = .25 |
---|
10 | ;z_scale = .15 marche pas (niveaux pas assez espaces en haut ?) |
---|
11 | ptop = 0.2 |
---|
12 | npbl = 5 |
---|
13 | ;z_scale = .15 |
---|
14 | ;ptop = 0.05 ;marche pas |
---|
15 | |
---|
16 | z_scale = .20 & ptop = 0.1 & npbl = 6 |
---|
17 | z_scale = .25 & ptop = 0.5 & npbl = 6 & nlev=61 ;; HOLDEN NESTS |
---|
18 | |
---|
19 | psurf=610. |
---|
20 | |
---|
21 | pbl = [1.0000,0.9995,0.9980,0.9950,0.9850,0.9700,0.9400,0.9000] |
---|
22 | x=[findgen(nlev)] |
---|
23 | nlev = nlev - npbl + 1 |
---|
24 | |
---|
25 | etas=[findgen(nlev)] |
---|
26 | FOR 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)) |
---|
28 | ENDFOR |
---|
29 | etas(nlev-1)=0. |
---|
30 | |
---|
31 | etas = [pbl(0:npbl-1),etas(1:nlev-1)] |
---|
32 | nlev = nlev + npbl - 1 |
---|
33 | print, 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 | ; |
---|
51 | print, 'eta levels' |
---|
52 | print, etas |
---|
53 | ; |
---|
54 | print, 'pressure' |
---|
55 | pi=etas*(psurf-ptop)+ptop |
---|
56 | print, pi |
---|
57 | print, 'ptop', ptop |
---|
58 | ; |
---|
59 | print, 'pseudo-altitude' |
---|
60 | pseudo=10.*alog(610./pi) |
---|
61 | print, 1000.*10.*alog(610./pi) |
---|
62 | |
---|
63 | |
---|
64 | ; |
---|
65 | ; PLOT |
---|
66 | ; |
---|
67 | plot, x, etas, title='ETA', xtickinterval=tinv |
---|
68 | !psym=7 & oplot, x, etas |
---|
69 | !psym=0 |
---|
70 | plot, x, pseudo, title='ALTITUDE (km)', xtickinterval=tinv |
---|
71 | !psym=7 & oplot, x, pseudo |
---|
72 | !psym=0 |
---|
73 | plot, x, pi, title='PRESSURE (Pa)', ylog=1, xtickinterval=tinv |
---|
74 | !psym=7 & oplot, x, pi |
---|
75 | !psym=0 |
---|
76 | ; |
---|
77 | diff=pseudo - shift(pseudo,-1) & diff=-diff(0:nlev-2) |
---|
78 | ; |
---|
79 | plot, 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 | ; |
---|
88 | openw, 1, 'levels' |
---|
89 | for i=0, nlev-1 do begin |
---|
90 | printf, 1, etas(i);,',' |
---|
91 | endfor |
---|
92 | close, 1 |
---|
93 | |
---|
94 | end |
---|