Last change
on this file since 105 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
|
File size:
1.3 KB
|
Rev | Line | |
---|
[85] | 1 | ;;Fixe l'echelle pour une tab2diable de type (x,y,z,t) ou (x,y,t) ou (z,t) |
---|
| 2 | ;;Possibilite de restreindre a une zone et des heures donnees |
---|
| 3 | |
---|
| 4 | pro goodscale, $ |
---|
| 5 | tab2d, $ |
---|
| 6 | mini, $ |
---|
| 7 | maxi, $ |
---|
| 8 | coeff=coeff_sigma |
---|
| 9 | |
---|
| 10 | print,'Yeah !' |
---|
| 11 | |
---|
| 12 | ; |
---|
| 13 | ; input: the 2D array which is ready to be plotted |
---|
| 14 | ; |
---|
| 15 | |
---|
| 16 | |
---|
| 17 | ;if (n_elements(coeff_sigma) eq 0) then coeff_sigma=3.3 ;; vincent |
---|
| 18 | if (n_elements(coeff_sigma) eq 0) then coeff_sigma=2.5 ;; aymeric |
---|
| 19 | |
---|
| 20 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
---|
| 21 | |
---|
| 22 | ;;calcul de la moyenne |
---|
| 23 | N=n_elements(tab2d) |
---|
| 24 | moy=(1/float(N))*total(tab2d) |
---|
| 25 | |
---|
| 26 | ;;calcul de la tab2diance |
---|
| 27 | moyarray = make_array(N, 1, /integer, value = 1) |
---|
| 28 | varia=(1/float(N-1))*total( ( tab2d - (moyarray * moy) )^2 ) |
---|
| 29 | |
---|
| 30 | ;;calcul de sigma |
---|
| 31 | sigma = sqrt( varia ) |
---|
| 32 | |
---|
| 33 | ;;echelle |
---|
| 34 | mini = moy - float(coeff_sigma) * sigma & stratmin = 'sigma' |
---|
| 35 | maxi = moy + float(coeff_sigma) * sigma & stratmax = 'sigma' |
---|
| 36 | |
---|
| 37 | ;;au cas ou |
---|
| 38 | if (mini lt min(tab2d)) then begin |
---|
| 39 | mini=min(tab2d) |
---|
| 40 | stratmin = 'real min' |
---|
| 41 | endif |
---|
| 42 | if (maxi gt max(tab2d)) then begin |
---|
| 43 | maxi=max(tab2d) |
---|
| 44 | stratmax = 'real max' |
---|
| 45 | endif |
---|
| 46 | |
---|
| 47 | |
---|
| 48 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
---|
| 49 | ;;affichage a l'ecran : |
---|
| 50 | print,'min :'+STRTRIM(mini,2)+' '+stratmin |
---|
| 51 | print,'max :'+STRTRIM(maxi,2)+' '+stratmax |
---|
| 52 | |
---|
| 53 | |
---|
| 54 | end |
---|
Note: See
TracBrowser
for help on using the repository browser.