Last change
on this file since 113 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:
691 bytes
|
Rev | Line | |
---|
[85] | 1 | pro grad, d_param, param, x, y, flag |
---|
| 2 | |
---|
| 3 | ; pour calculer le champ de gradient d'un champ 2D |
---|
| 4 | ; d_param = résultat 2D |
---|
| 5 | ; param: tableau 2D |
---|
| 6 | ; x: tableau 1D |
---|
| 7 | ; y: tableau 1D |
---|
| 8 | ; flag: 1 pour grad_x |
---|
| 9 | ; 2 pour grad_y |
---|
| 10 | |
---|
| 11 | |
---|
| 12 | missing=1.e30 |
---|
| 13 | w=where(abs(param) gt missing) |
---|
| 14 | if (w(0) ne -1) then param[w]=0. |
---|
| 15 | |
---|
| 16 | |
---|
| 17 | imax = n_elements(param(*,0)) |
---|
| 18 | jmax = n_elements(param(0,*)) |
---|
| 19 | |
---|
| 20 | d_param=dblarr(imax,jmax) |
---|
| 21 | case flag of |
---|
| 22 | 1: begin |
---|
| 23 | for j = 0, jmax-1 do begin |
---|
| 24 | d_param(*,j) = DERIV(x,param(*,j)) |
---|
| 25 | ; d_param(*,j) = DERIV(reform(param(*,j)),x) |
---|
| 26 | endfor |
---|
| 27 | end |
---|
| 28 | 2: begin |
---|
| 29 | for i = 0, imax-1 do begin |
---|
| 30 | d_param(i,*) = DERIV(y,param(i,*)) |
---|
| 31 | ; d_param(i,*) = DERIV(reform(param(i,*)),y) |
---|
| 32 | endfor |
---|
| 33 | end |
---|
| 34 | endcase |
---|
| 35 | end |
---|
Note: See
TracBrowser
for help on using the repository browser.