[85] | 1 | |
---|
| 2 | if ((winds(0) eq 'tk') and (winds(1) eq 'HGT')) then begin |
---|
| 3 | |
---|
| 4 | print, 'computing sea-level pressure' |
---|
| 5 | title='Reduced surf. pressure (Pa)' |
---|
| 6 | ;title='Equiv. Temperature (K)' |
---|
| 7 | pression=what_I_plot |
---|
| 8 | |
---|
| 9 | |
---|
| 10 | ;what_I_plot = what_I_plot + 30. |
---|
| 11 | ;overvector_x = overvector_x*0. + overvector_x(0,0) |
---|
| 12 | |
---|
| 13 | ;; |
---|
| 14 | ;; TGCM |
---|
| 15 | ;; |
---|
| 16 | ;nx=n_elements(overvector_y(*,0)) |
---|
| 17 | ;ny=n_elements(overvector_y(0,*)) |
---|
| 18 | ;tgcm=( overvector_x(0,0)+ $ |
---|
| 19 | ; overvector_x(nx-1,0)+ $ |
---|
| 20 | ; overvector_x(0,ny-1)+ $ |
---|
| 21 | ; overvector_x(nx-1,ny-1) ) / 4. |
---|
| 22 | ;print, overvector_x(0,0), overvector_x(nx-1,0), overvector_x(0,ny-1), overvector_x(nx-1,ny-1) |
---|
| 23 | ;print, tgcm |
---|
| 24 | ;; |
---|
| 25 | ;; USUAL SYSTEMATIC BIAS |
---|
| 26 | ;; |
---|
| 27 | ;what_I_plot = what_I_plot + 20. |
---|
| 28 | ;; |
---|
| 29 | ;; ROUGH T EFFECT ON RADIATIVE TRANSFER |
---|
| 30 | ;; |
---|
| 31 | ;print, mean(overvector_x) |
---|
| 32 | ;caca=tgcm - overvector_x |
---|
| 33 | ;;caca=tgcm - mean(overvector_x) |
---|
| 34 | ;what_I_plot = what_I_plot - caca |
---|
| 35 | ;; |
---|
| 36 | ;; TEMP FOR HYPSOMETRIC |
---|
| 37 | ;; - attenue un peu - peu d'effets |
---|
| 38 | ;overvector_x = overvector_x*0. + tgcm |
---|
| 39 | ;; |
---|
| 40 | ;; NOISE OF 2.2 Pa |
---|
| 41 | ;; |
---|
| 42 | ;what_I_plot = what_I_plot + 2.2*(2.*(RANDOMU(seed,nx,ny)-0.5)) |
---|
| 43 | |
---|
| 44 | ;;; NON |
---|
| 45 | ;;;ecart_t = 222. - overvector_x ;; tgcm - tmeso |
---|
| 46 | ;;;ecart_p = - ecart_t ;; pgcm - pmeso |
---|
| 47 | ;;;yeahyeah = what_I_plot - ecart_p ;; pmeso + pgcm - pmeso = pgcm |
---|
| 48 | ;;;what_I_plot = yeahyeah |
---|
| 49 | |
---|
| 50 | ;;;;marche bof |
---|
| 51 | ;;overvector_y=CONGRID(overvector_y,nx*50,ny*50) |
---|
| 52 | ;;overvector_y=shift(overvector_y,1,1) |
---|
| 53 | ;;overvector_y=CONGRID(overvector_y,nx,ny) |
---|
| 54 | |
---|
| 55 | |
---|
| 56 | |
---|
| 57 | ;;augmen=10./100. |
---|
| 58 | ;;augmen=0. |
---|
| 59 | ;;mmm=mean(overvector_y) |
---|
| 60 | ;;overvector_y=overvector_y-mmm |
---|
| 61 | ;;overvector_y=overvector_y*(1.+augmen) |
---|
| 62 | ;;print, max(overvector_y), min(overvector_y) |
---|
| 63 | ;;overvector_y=mmm+overvector_y |
---|
| 64 | ;;print, max(overvector_y), mean(overvector_y), min(overvector_y) |
---|
| 65 | |
---|
| 66 | |
---|
| 67 | ;;*******************************BRUIT |
---|
| 68 | ;;;;50m limite ... |
---|
| 69 | ;noise=25. |
---|
| 70 | ;print, max(overvector_y), mean(overvector_y), min(overvector_y) |
---|
| 71 | ;overvector_y=overvector_y + noise*(2.*(RANDOMU(seed,nx,ny)-0.5)) |
---|
| 72 | ;print, max(overvector_y), mean(overvector_y), min(overvector_y) |
---|
| 73 | ;;*******************************BRUIT |
---|
| 74 | |
---|
| 75 | |
---|
| 76 | |
---|
| 77 | |
---|
| 78 | |
---|
| 79 | |
---|
| 80 | |
---|
| 81 | |
---|
| 82 | |
---|
| 83 | |
---|
| 84 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
---|
| 85 | H=192.*overvector_x/3.72 ;;unit is m |
---|
| 86 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
---|
| 87 | zref=mean(overvector_y) ;;topo (m) |
---|
| 88 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
---|
| 89 | |
---|
| 90 | |
---|
| 91 | goto, notest |
---|
| 92 | ;;;**************************************************************************************** |
---|
| 93 | ;;; TEMPERATURE |
---|
| 94 | ;temp_meso=overvector_x ;;save if needed |
---|
| 95 | ;overvector_x=mean(overvector_x) |
---|
| 96 | ;H=192.*overvector_x/3.72 |
---|
| 97 | ;tempbias=temp_meso-overvector_x |
---|
| 98 | |
---|
| 99 | ;; PRESSURE |
---|
| 100 | ;ptopo=610.*exp(-overvector_y/H) & what_I_plot=ptopo ;; perfect case |
---|
| 101 | |
---|
| 102 | ;w1=where((overvector_y - median(overvector_y)) gt 200.) & w2=where((overvector_y - median(overvector_y)) lt -200.) |
---|
| 103 | ;tempbias=overvector_x*0. & tempbias[w1] = -20. & tempbias[w2] = +20. |
---|
| 104 | |
---|
| 105 | ;; TEMPBIAS IN SCALE HEIGHT |
---|
| 106 | ;tempbias=mean(overvector_x)-overvector_x |
---|
| 107 | ;tempbias=-10. |
---|
| 108 | |
---|
| 109 | ;; ZREF |
---|
| 110 | ;zref=0. |
---|
| 111 | |
---|
| 112 | ;; REFPRES |
---|
| 113 | ;refpres=610. |
---|
| 114 | |
---|
| 115 | |
---|
| 116 | ;; |
---|
| 117 | ;; perfect case |
---|
| 118 | ;; |
---|
| 119 | ;ptopo=610.*exp(-overvector_y/H) & what_I_plot=ptopo |
---|
| 120 | ;tempbias=222.-overvector_x |
---|
| 121 | ;zref=0. |
---|
| 122 | ;refpres=610. |
---|
| 123 | |
---|
| 124 | ;; |
---|
| 125 | ;; comp OMEGA |
---|
| 126 | ;; |
---|
| 127 | ;tcst = 222. ;;230. 226. 206. |
---|
| 128 | ;tempbias=tcst-overvector_x |
---|
| 129 | zref=-945.43469 |
---|
| 130 | ;refpres=0. |
---|
| 131 | ;zref=-200. |
---|
| 132 | ;zref=-400. |
---|
| 133 | ;zref=-95. |
---|
| 134 | ;;;**************************************************************************************** |
---|
| 135 | notest: |
---|
| 136 | |
---|
| 137 | ;goto, caca |
---|
| 138 | ;;;;;;;;;;;;;;;;;;;;;;;;;;; |
---|
| 139 | ;; ;; |
---|
| 140 | ;; HYPSOMETRIC EQUATION ;; |
---|
| 141 | ;; ;; |
---|
| 142 | ;;;;;;;;;;;;;;;;;;;;;;;;;;; |
---|
| 143 | ; |
---|
| 144 | ; recalculate H with temperature bias |
---|
| 145 | ; |
---|
| 146 | if (n_elements(tempbias) eq 0) then tempbias=0. ;; verif: donne champ constant quand perfect |
---|
| 147 | H=192.*(overvector_x+tempbias)/3.72 |
---|
| 148 | print, 'zref', zref, ' meanH', mean(H) |
---|
| 149 | ; |
---|
| 150 | ; hypsometric |
---|
| 151 | ; |
---|
| 152 | what_I_plot=what_I_plot*exp((overvector_y-zref)/H) |
---|
| 153 | ; |
---|
| 154 | ; anomaly |
---|
| 155 | ; |
---|
| 156 | if (n_elements(refpres) eq 0) then refpres=median(what_I_plot) |
---|
| 157 | if (refpres eq -9999) then refpres=median(what_I_plot) |
---|
| 158 | what_I_plot=what_I_plot-refpres |
---|
| 159 | refpres=-9999. |
---|
| 160 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
---|
| 161 | caca: |
---|
| 162 | |
---|
| 163 | |
---|
| 164 | goto, coucou |
---|
| 165 | |
---|
| 166 | |
---|
| 167 | ;;for coco=0,100 do begin |
---|
| 168 | ;;altchosen = 100. - float(coco*10.) |
---|
| 169 | ;;print, altchosen |
---|
| 170 | |
---|
| 171 | |
---|
| 172 | ;altchosen=-915.93644 |
---|
| 173 | ;altchosen=200. |
---|
| 174 | ;altchosen=max(overvector_y) |
---|
| 175 | ;altchosen=min(overvector_y) |
---|
| 176 | ;altchosen=mean(overvector_y) |
---|
| 177 | ;altchosen=0. |
---|
| 178 | ;altchosen=-2000. |
---|
| 179 | ;altchosen=-200. |
---|
| 180 | ;altchosen=200. |
---|
| 181 | ;altchosen=-400. |
---|
| 182 | ;altchosen=1000. |
---|
| 183 | ;altchosen=200. ;; le meilleur match entre H et RT1km/g ATTENTION, NON !! |
---|
| 184 | ;altchosen=-200. ;; le meilleur pour 13h |
---|
| 185 | ;altchosen=-400. ;;Tequiv trop hautes |
---|
| 186 | ;altchosen=-90. |
---|
| 187 | ;altchosen=-93. |
---|
| 188 | ;altchosen=-95. |
---|
| 189 | ;altchosen=-400. |
---|
| 190 | ;altchosen=-890. |
---|
| 191 | |
---|
| 192 | altchosen=-50. |
---|
| 193 | ;read, altchosen, prompt='alt?' |
---|
| 194 | |
---|
| 195 | ;;-----------------------;; |
---|
| 196 | ;; find nearest point ! ;; |
---|
| 197 | ;;-----------------------;; |
---|
| 198 | dis=overvector_y-altchosen & w=where(abs(dis) eq min(abs(dis))) & zref=overvector_y[w(0)] & Pref=pression[w(0)] |
---|
| 199 | print, zref, Pref |
---|
| 200 | |
---|
| 201 | |
---|
| 202 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
---|
| 203 | ;; |
---|
| 204 | ;; |
---|
| 205 | ;hache=192.* overvector_x / 3.72 & what_I_plot2=hache*alog(Pref/what_I_plot) - (overvector_y-altchosen) |
---|
| 206 | ;what_I_plot=what_I_plot2 |
---|
| 207 | ;print, min(what_I_plot2), max(what_I_plot2), mean(what_I_plot2) |
---|
| 208 | ;goto, coucou |
---|
| 209 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
---|
| 210 | |
---|
| 211 | ;;-------------------------;; |
---|
| 212 | ;; POSSIBLE 0/0 PROBLEMS ;; |
---|
| 213 | ;;-------------------------;; |
---|
| 214 | w=where(abs(alog(Pref/what_I_plot)) lt 0.02) & if (w(0) ne -1) then what_I_plot[w]=!Values.F_NAN |
---|
| 215 | w=where(abs(overvector_y-zref) lt 100.) & if (w(0) ne -1) then what_I_plot[w]=!Values.F_NAN |
---|
| 216 | |
---|
| 217 | ;;-------------------------;; |
---|
| 218 | ;; EQUIVALENT TEMPERATURE ;; |
---|
| 219 | ;;-------------------------;; |
---|
| 220 | ; |
---|
| 221 | ; H |
---|
| 222 | ; |
---|
| 223 | what_I_plot=(overvector_y-zref)/alog(Pref/what_I_plot)/1000. |
---|
| 224 | ; |
---|
| 225 | ; T |
---|
| 226 | ; |
---|
| 227 | what_I_plot=what_I_plot*3.72*1000./192. |
---|
| 228 | ;what_I_plot=what_I_plot - overvector_x |
---|
| 229 | |
---|
| 230 | |
---|
| 231 | ;;-----------------------;; |
---|
| 232 | ;; MOYENNE OK AVEC NANs ;; |
---|
| 233 | ;;-----------------------;; |
---|
| 234 | ; |
---|
| 235 | ;w=where(FINITE(what_I_plot) ne 0) & moyen=mean(what_I_plot[w]) & print, moyen |
---|
| 236 | ;what_I_plot=what_I_plot-moyen |
---|
| 237 | |
---|
| 238 | coucou: |
---|
| 239 | |
---|
| 240 | ;;endfor |
---|
| 241 | |
---|
| 242 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
---|
| 243 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
---|
| 244 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
---|
| 245 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
---|
| 246 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
---|
| 247 | |
---|
| 248 | |
---|
| 249 | |
---|
| 250 | |
---|
| 251 | ;what_I_plot=what_I_plot-mean(what_I_plot) |
---|
| 252 | |
---|
| 253 | |
---|
| 254 | |
---|
| 255 | ;;M1 |
---|
| 256 | ;what_I_plot=what_I_plot-ptopo-mean(what_I_plot-ptopo) |
---|
| 257 | |
---|
| 258 | |
---|
| 259 | ;what_I_plot=caca |
---|
| 260 | ;what_I_plot=tempbias |
---|
| 261 | ;what_I_plot=topo_ecart |
---|
| 262 | |
---|
| 263 | |
---|
| 264 | |
---|
| 265 | ;level_1km=6 |
---|
| 266 | ;; |
---|
| 267 | ;; mean temperature for the whole period |
---|
| 268 | ;; |
---|
| 269 | ;temptmp=reform(u[*,*,level_1km,*]) |
---|
| 270 | ;meantemp=total(temptmp,3)/n_elements(temptmp(0,0,*)) |
---|
| 271 | ;Hmean=192.*meantemp/3.72 |
---|
| 272 | ;; |
---|
| 273 | ;; mean surface pressure for the whole period |
---|
| 274 | ;; |
---|
| 275 | ;temppres=reform(var[*,*,theloop,*]) |
---|
| 276 | ;meanpres=total(temppres,3)/n_elements(temppres(0,0,*)) |
---|
| 277 | ; |
---|
| 278 | ; |
---|
| 279 | ; ;** HYDROSTATIC REDUCTION TO LEVEL OF REFERENCE |
---|
| 280 | ; |
---|
| 281 | ; overvector_x=reform(u[*,*,level_1km,nt]) ;;T 1km |
---|
| 282 | ; H=192.*overvector_x/3.72 ;unit is m |
---|
| 283 | ; |
---|
| 284 | ; overvector_y=reform(v[*,*,0,nt]) ;;topo (m) |
---|
| 285 | ; zref=mean(overvector_y) |
---|
| 286 | ; ;zref=median(overvector_y) |
---|
| 287 | ; ;zref=(max(overvector_y)-min(overvector_y))/2. |
---|
| 288 | ; ;zref=3000. |
---|
| 289 | ; print, 'zref', zref |
---|
| 290 | ; |
---|
| 291 | ; ; |
---|
| 292 | ; ; HYPSOMETRIC EQUATION |
---|
| 293 | ; ; |
---|
| 294 | ;;********** |
---|
| 295 | ;H=Hmean |
---|
| 296 | ;;********** |
---|
| 297 | ; what_I_plot=what_I_plot*exp((overvector_y-zref)/H) |
---|
| 298 | ; meanpres=meanpres*exp((overvector_y-zref)/Hmean) |
---|
| 299 | ; |
---|
| 300 | ; |
---|
| 301 | ;; |
---|
| 302 | ;; pressure anomaly |
---|
| 303 | ;; |
---|
| 304 | ;what_I_plot=what_I_plot-meanpres |
---|
| 305 | ; |
---|
| 306 | ; |
---|
| 307 | ;;presoro=610.*exp(overvector_y/10000.) |
---|
| 308 | ;;what_I_plot=what_I_plot-presoro |
---|
| 309 | |
---|
| 310 | |
---|
| 311 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
---|
| 312 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
---|
| 313 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
---|
| 314 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
---|
| 315 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
---|
| 316 | |
---|
| 317 | |
---|
| 318 | |
---|
| 319 | |
---|
| 320 | overvector_x=0 |
---|
| 321 | overvector_y=0 |
---|
| 322 | |
---|
| 323 | endif |
---|