source: trunk/MESOSCALE/PLOT/RESERVE/ertel_vorticity.idl @ 170

Last change on this file since 170 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: 2.1 KB
Line 
1
2if ((field1 eq 'T') and (winds(0) eq 'U') and (winds(1) eq 'V')) $
3        or ((field1 eq 'tk') and (winds(0) eq 'U') and (winds(1) eq 'V')) $
4        or ((field1 eq 'HGT') and (winds(0) eq 'U') and (winds(1) eq 'V')) then begin
5
6;print, 'computing Ertel potential vorticity'
7;;---------------------------------------------------
8;;** ERTEL POTENTIAL VORTICITY
9;;---------------------------------------------------
10;; vort scalaire grad_theta / rho
11;;               and rho equal p / gH (because H ~ RT/g)
12;H=10.
13;g=3.72
14;for i=0, west_east-1 do begin
15;for j=0, south_north-1 do begin
16;     theta=220.+var[i,j,*,nt]
17;     dtheta_dz=DERIV(z*1000., theta)
18;     fac=dtheta_dz*H*g/z     ;;fac est EPV/(abs. vort)
19;     what_I_plot(i,j)=fac(theloop)
20;endfor
21;endfor
22;; alternative method : ksi * g * dtheta_dp
23;
24;
25;;--------------------------
26;; coriolis parameter 'f'
27;;--------------------------
28;omeg=7.0721E-5
29;coriolis=2*omeg*sin(lat*!pi/180)
30;ny=n_elements(coriolis)
31;nx=n_elements(what_I_plot(*,1))
32;f=fltarr(nx,ny)
33;for i=0,nx-1 do begin
34;for j=0,ny-1 do begin
35;       f(i,j)=coriolis(j)
36;endfor
37;endfor
38;print, 'coriolis'
39;print, mean(coriolis)
40;
41;;----------------------------------
42;; horizontal coordinates (meters)
43;;----------------------------------
44rad=3397000.
45deg_m=2*rad*!pi/360.
46dlon=deg_m*cos(y*!pi/180)
47dlat=deg_m
48xcal=(x-min(x))*dlon
49ycal=(y-min(y))*dlat
50
51;---------------------------------
52; wind gradients (s-1)
53;---------------------------------
54grad, dv_dx, overvector_y, xcal, ycal, 1
55grad, dv_dy, overvector_y, xcal, ycal, 2
56grad, du_dx, overvector_x, xcal, ycal, 1
57grad, du_dy, overvector_x, xcal, ycal, 2
58
59;;-----------------------------------------
60;; absolute and relative vorticity (s-1)
61;;-----------------------------------------
62;;what_I_plot=(f+dv_dx-du_dy)*what_I_plot*1.e6
63;what_I_plot=(dv_dx-du_dy)*1.e6
64what_I_plot=(dv_dx-du_dy)*1.e4 
65                        ;now vort. is in PVU !!
66                        ;which is 1e-6 K.kg-1.m2.s-1
67;w=where(abs(what_I_plot) gt 1.e10)
68;if (w(0) ne -1) then what_I_plot[w]=1.e38
69
70;overcontour = (dv_dx-du_dy)*1.e4
71
72
73;overcontour = sqrt((overvector_x + overvector_y)^2)
74;overvector_x=0
75;overvector_y=0
76minfield_init=0.
77maxfield_init=0.
78title='Vorticity (1e-4 s!U-1!N)'
79
80endif
Note: See TracBrowser for help on using the repository browser.