source: trunk/MESOSCALE_DEV/PLOT/SPEC/GW/scorerprof.pro @ 1181

Last change on this file since 1181 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: 4.5 KB
Line 
1pro scorerprof
2;;;;;;;;;;;;;;
3
4;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
5path='../TESTGW/'
6experiment=''
7        ;;path='../TESTGW_save/gw/TESTGW/'
8        ;;experiment='mcd_lt16_calcprho'
9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
10;
11;
12;
13what_I_plot=0. & overcontour=0.
14zefile=experiment+"_scorer"
15;
16;
17;
18  PS_Start, filename=zefile+'.ps'
19  print, zefile+'.ps'
20  !P.Charsize = 1.2
21  !p.charthick = 2.0
22  !p.thick = 2.0
23  !x.thick = 2.0
24  !y.thick = 2.0
25;
26;
27;
28   ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
29   file=path+experiment+'/input_sounding' & header='' & nlines_header=1 & ncol = 5
30   ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
31   nlines = FILE_LINES(file)-nlines_header & data=FLTARR(ncol,nlines)
32   OPENR, lun, file, /GET_LUN & READF, lun, header & READF, lun, data & CLOSE, lun & FREE_LUN, lun
33   ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
34   z      = reform(data(0,*)) 
35   theta  = reform(data(1,*))
36   windu  = reform(data(3,*))   
37           ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
38           file=path+experiment+'/input_therm' & ncol = 5
39           ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
40           nlines = FILE_LINES(file) & data=FLTARR(ncol,nlines)
41           OPENR, lun, file, /GET_LUN & READF, lun, data & CLOSE, lun & FREE_LUN, lun
42           ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
43           rrr      = reform(data(0,*))
44           press    = reform(data(2,*))
45           rho      = reform(data(3,*))
46           temp     = reform(data(4,*))
47
48nsmooth=1
49;nsmooth=3
50;nsmooth=5
51nsmooth=7  ;; 1 lev each km interp, 1 lev each 7 km GCM
52;nsmooth=10 
53nsmooth=15
54nsmooth=20
55nsmooth=22
56z = smooth(z,nsmooth,/EDGE_TRUNCATE)
57theta = smooth(theta,nsmooth,/EDGE_TRUNCATE)
58windu  = smooth(windu,nsmooth,/EDGE_TRUNCATE)
59        ;windu  = smooth(windu,60,/EDGE_TRUNCATE) ;; juste pour lower shear
60
61;;; altitude above local surface
62z = z - z(0)
63
64;;; brunt vaisala frequency
65g=3.72 & dlnthetadz=DERIV(z,alog(theta)) & n2=g*dlnthetadz
66st2 = n2 / (windu^2)
67        ;;w = where(n2 le 0.)
68        ;;n = n2 & n[w] = 0. & n = sqrt(TEMPORARY(n)) & n[w] = -1.
69        ;;st2[w] = 0.
70
71;;; shear term
72dudz=DERIV(z,windu)
73d2udz2=DERIV(z,dudz)
74dlnrhodz = DERIV(z,alog(rho))
75sh2 = - d2udz2 / windu + dlnrhodz * dudz / windu
76
77;;;; scale height term
78drhodz = DERIV(z,rho)
79d2rhodz2 = DERIV(z,drhodz)
80hh2 = d2rhodz2 / 2. / rho - 0.75 * dlnrhodz * dlnrhodz
81
82        ;for i=0,n_elements(windu)-1 do begin
83        ;  ;print, windu(i), n2 / (windu^2), - d2udz2(i) / windu(i), dlnrhodz(i) * dudz(i) / windu(i), d2rhodz2 / 2. / rho, - 0.75 * dlnrhodz * dlnrhodz
84        ;  print, 'YO YO ... ', st2(i), sh2(i), hh2(i)
85        ;endfor
86        ;stop
87
88;;; scorer parameter ;; erreur dans article Tobie, Lott98 OK
89scorer2 = st2 + sh2 + hh2   
90
91;;; relative contributions
92part_buoy = 100. * abs(st2) / (abs(st2)+abs(sh2)+abs(hh2))
93part_shea = 100. * abs(sh2) / (abs(st2)+abs(sh2)+abs(hh2))
94part_heig = 100. * abs(hh2) / (abs(st2)+abs(sh2)+abs(hh2))
95
96;;; scorer wavelength
97scorer = sqrt(scorer2)
98lscorer = scorer & w = where(FINITE(lscorer) eq 0) & if (w(0) ne -1) then lscorer[w] = !Values.F_NAN
99lscorer = 2 * !pi / lscorer
100
101        for i=0, n_elements(z)-1, 5 do begin
102         print, 'alt, buoy, shear, sc. height, scorer, scorer wvl'
103         print, z(i), part_buoy(i), part_shea(i), part_heig(i), scorer2(i), lscorer(i)/1000.
104        endfor
105
106     ;;;;;;;;;;;
107     what_I_plot = lscorer / 1000.
108     column = z / 1000.
109     overplot_column = column
110     alt = [0.,150.]
111     mention = ''
112     minfield_init = 0.001
113     maxfield_init = 200.
114     title_axis = ['Scorer wavelength (km)','Altitude above local surface (km)']
115     ;;;;;;;;;;;
116
117!p.multi=[0,2,1]
118
119        ;plot, temp, column, $
120        ;      xtickinterval=50., $
121        ;      ytickinterval=10., $
122        ;      xtitle=title_axis(0), $
123        ;      ytitle=title_axis(1), $
124        ;      xrange=[50.,200.], $
125        ;      yrange=alt
126        ;oplot, 200.+windu, column, linestyle=1
127
128plot, what_I_plot, column, $
129      xtickinterval=50., $
130      ytickinterval=10., $
131      xtitle=title_axis(0), $
132      ytitle=title_axis(1), $
133      xrange=[minfield_init,maxfield_init], $
134      yrange=alt
135oplot, temp, column, linestyle=2
136oplot, 150.+windu, column, linestyle=1
137xyouts, 40., 20., 'dotted: 150+U(z) [m s!U-1!N]', charsize=0.8
138xyouts, 40., 10., 'dashed: T(z) [K]', charsize=0.8
139
140plot, part_buoy, column, $
141      xtickinterval=20., $
142      ytickinterval=10., $
143      xtitle='Contributions to Scorer parameter (%)', $
144      ytitle=title_axis(1), $
145      xrange=[minfield_init,100.], $
146      yrange=alt, $
147      linestyle=0
148oplot, part_shea, column, linestyle=2
149oplot, part_heig, column, linestyle=1
150xyouts, 30., 140., 'full: buoyancy';, charsize=0.8
151xyouts, 30., 130., 'dashed: shear';, charsize=0.8
152xyouts, 30., 120., 'dotted: sc. height';, charsize=0.8
153
154
155
156PS_End, /PNG
157end
Note: See TracBrowser for help on using the repository browser.