source: trunk/MESOSCALE/PLOT/RESERVE/grad.pro @ 134

Last change on this file since 134 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
Line 
1pro 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
12missing=1.e30
13w=where(abs(param) gt missing)
14if (w(0) ne -1) then param[w]=0.
15
16
17imax = n_elements(param(*,0))
18jmax = n_elements(param(0,*))
19
20d_param=dblarr(imax,jmax)
21case flag of
221: begin
23for j = 0, jmax-1 do begin
24                d_param(*,j) = DERIV(x,param(*,j))
25;               d_param(*,j) = DERIV(reform(param(*,j)),x)
26endfor
27end
282: begin
29for i = 0, imax-1 do begin
30                d_param(i,*) = DERIV(y,param(i,*))
31;               d_param(i,*) = DERIV(reform(param(i,*)),y)
32endfor
33end
34endcase
35end
Note: See TracBrowser for help on using the repository browser.