| [85] | 1 | |
|---|
| 2 | if ((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 | ;;---------------------------------- |
|---|
| 44 | rad=3397000. |
|---|
| 45 | deg_m=2*rad*!pi/360. |
|---|
| 46 | dlon=deg_m*cos(y*!pi/180) |
|---|
| 47 | dlat=deg_m |
|---|
| 48 | xcal=(x-min(x))*dlon |
|---|
| 49 | ycal=(y-min(y))*dlat |
|---|
| 50 | |
|---|
| 51 | ;--------------------------------- |
|---|
| 52 | ; wind gradients (s-1) |
|---|
| 53 | ;--------------------------------- |
|---|
| 54 | grad, dv_dx, overvector_y, xcal, ycal, 1 |
|---|
| 55 | grad, dv_dy, overvector_y, xcal, ycal, 2 |
|---|
| 56 | grad, du_dx, overvector_x, xcal, ycal, 1 |
|---|
| 57 | grad, 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 |
|---|
| 64 | what_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 |
|---|
| 76 | minfield_init=0. |
|---|
| 77 | maxfield_init=0. |
|---|
| 78 | title='Vorticity (1e-4 s!U-1!N)' |
|---|
| 79 | |
|---|
| 80 | endif |
|---|