1 | pro scorerprof |
---|
2 | ;;;;;;;;;;;;;; |
---|
3 | |
---|
4 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
---|
5 | path='../TESTGW/' |
---|
6 | experiment='' |
---|
7 | ;;path='../TESTGW_save/gw/TESTGW/' |
---|
8 | ;;experiment='mcd_lt16_calcprho' |
---|
9 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
---|
10 | ; |
---|
11 | ; |
---|
12 | ; |
---|
13 | what_I_plot=0. & overcontour=0. |
---|
14 | zefile=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 | |
---|
48 | nsmooth=1 |
---|
49 | ;nsmooth=3 |
---|
50 | ;nsmooth=5 |
---|
51 | nsmooth=7 ;; 1 lev each km interp, 1 lev each 7 km GCM |
---|
52 | ;nsmooth=10 |
---|
53 | nsmooth=15 |
---|
54 | nsmooth=20 |
---|
55 | nsmooth=22 |
---|
56 | z = smooth(z,nsmooth,/EDGE_TRUNCATE) |
---|
57 | theta = smooth(theta,nsmooth,/EDGE_TRUNCATE) |
---|
58 | windu = smooth(windu,nsmooth,/EDGE_TRUNCATE) |
---|
59 | ;windu = smooth(windu,60,/EDGE_TRUNCATE) ;; juste pour lower shear |
---|
60 | |
---|
61 | ;;; altitude above local surface |
---|
62 | z = z - z(0) |
---|
63 | |
---|
64 | ;;; brunt vaisala frequency |
---|
65 | g=3.72 & dlnthetadz=DERIV(z,alog(theta)) & n2=g*dlnthetadz |
---|
66 | st2 = 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 |
---|
72 | dudz=DERIV(z,windu) |
---|
73 | d2udz2=DERIV(z,dudz) |
---|
74 | dlnrhodz = DERIV(z,alog(rho)) |
---|
75 | sh2 = - d2udz2 / windu + dlnrhodz * dudz / windu |
---|
76 | |
---|
77 | ;;;; scale height term |
---|
78 | drhodz = DERIV(z,rho) |
---|
79 | d2rhodz2 = DERIV(z,drhodz) |
---|
80 | hh2 = 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 |
---|
89 | scorer2 = st2 + sh2 + hh2 |
---|
90 | |
---|
91 | ;;; relative contributions |
---|
92 | part_buoy = 100. * abs(st2) / (abs(st2)+abs(sh2)+abs(hh2)) |
---|
93 | part_shea = 100. * abs(sh2) / (abs(st2)+abs(sh2)+abs(hh2)) |
---|
94 | part_heig = 100. * abs(hh2) / (abs(st2)+abs(sh2)+abs(hh2)) |
---|
95 | |
---|
96 | ;;; scorer wavelength |
---|
97 | scorer = sqrt(scorer2) |
---|
98 | lscorer = scorer & w = where(FINITE(lscorer) eq 0) & if (w(0) ne -1) then lscorer[w] = !Values.F_NAN |
---|
99 | lscorer = 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 | |
---|
128 | plot, 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 |
---|
135 | oplot, temp, column, linestyle=2 |
---|
136 | oplot, 150.+windu, column, linestyle=1 |
---|
137 | xyouts, 40., 20., 'dotted: 150+U(z) [m s!U-1!N]', charsize=0.8 |
---|
138 | xyouts, 40., 10., 'dashed: T(z) [K]', charsize=0.8 |
---|
139 | |
---|
140 | plot, 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 |
---|
148 | oplot, part_shea, column, linestyle=2 |
---|
149 | oplot, part_heig, column, linestyle=1 |
---|
150 | xyouts, 30., 140., 'full: buoyancy';, charsize=0.8 |
---|
151 | xyouts, 30., 130., 'dashed: shear';, charsize=0.8 |
---|
152 | xyouts, 30., 120., 'dotted: sc. height';, charsize=0.8 |
---|
153 | |
---|
154 | |
---|
155 | |
---|
156 | PS_End, /PNG |
---|
157 | end |
---|