1 | SUBROUTINE enercin(vcov, ucov, vcont, ucont, ecin) |
---|
2 | |
---|
3 | !------------------------------------------------------------------------------- |
---|
4 | ! Authors: P. Le Van. |
---|
5 | !------------------------------------------------------------------------------- |
---|
6 | ! Purpose: Compute kinetic energy at sigma levels. |
---|
7 | USE lmdz_comgeom |
---|
8 | |
---|
9 | IMPLICIT NONE |
---|
10 | INCLUDE "dimensions.h" |
---|
11 | INCLUDE "paramet.h" |
---|
12 | !=============================================================================== |
---|
13 | ! Arguments: |
---|
14 | REAL, INTENT(IN) :: vcov (ip1jm, llm) |
---|
15 | REAL, INTENT(IN) :: ucov (ip1jmp1, llm) |
---|
16 | REAL, INTENT(IN) :: vcont (ip1jm, llm) |
---|
17 | REAL, INTENT(IN) :: ucont (ip1jmp1, llm) |
---|
18 | REAL, INTENT(OUT) :: ecin (ip1jmp1, llm) |
---|
19 | !=============================================================================== |
---|
20 | ! Notes: |
---|
21 | ! . V |
---|
22 | ! i,j-1 |
---|
23 | |
---|
24 | ! alpha4 . . alpha1 |
---|
25 | |
---|
26 | |
---|
27 | ! U . . P . U |
---|
28 | ! i-1,j i,j i,j |
---|
29 | |
---|
30 | ! alpha3 . . alpha2 |
---|
31 | |
---|
32 | |
---|
33 | ! . V |
---|
34 | ! i,j |
---|
35 | |
---|
36 | ! Kinetic energy at scalar point P(i,j) (excluding poles) is: |
---|
37 | ! Ecin = 0.5 * U(i-1,j)**2 *( alpha3 + alpha4 ) + |
---|
38 | ! 0.5 * U(i ,j)**2 *( alpha1 + alpha2 ) + |
---|
39 | ! 0.5 * V(i,j-1)**2 *( alpha1 + alpha4 ) + |
---|
40 | ! 0.5 * V(i, j)**2 *( alpha2 + alpha3 ) |
---|
41 | !=============================================================================== |
---|
42 | ! Local variables: |
---|
43 | INTEGER :: l, ij, i |
---|
44 | REAL :: ecinni(iip1), ecinsi(iip1), ecinpn, ecinps |
---|
45 | !=============================================================================== |
---|
46 | DO l = 1, llm |
---|
47 | DO ij = iip2, ip1jm - 1 |
---|
48 | ecin(ij + 1, l) = 0.5 * (ucov(ij, l) * ucont(ij, l) * alpha3p4(ij + 1) & |
---|
49 | + ucov(ij + 1, l) * ucont(ij + 1, l) * alpha1p2(ij + 1) & |
---|
50 | + vcov(ij - iim, l) * vcont(ij - iim, l) * alpha1p4(ij + 1) & |
---|
51 | + vcov(ij + 1, l) * vcont(ij + 1, l) * alpha2p3(ij + 1)) |
---|
52 | END DO |
---|
53 | !--- Correction: ecin(1,j,l)= ecin(iip1,j,l) |
---|
54 | DO ij = iip2, ip1jm, iip1; ecin(ij, l) = ecin(ij + iim, l); |
---|
55 | END DO |
---|
56 | |
---|
57 | !--- North pole |
---|
58 | DO i = 1, iim |
---|
59 | ecinni(i) = vcov(i, l) * vcont(i, l) * aire(i) |
---|
60 | END DO |
---|
61 | ecinpn = 0.5 * SUM(ecinni(1:iim)) / apoln |
---|
62 | DO ij = 1, iip1; ecin(ij, l) = ecinpn; |
---|
63 | END DO |
---|
64 | |
---|
65 | !--- South pole |
---|
66 | DO i = 1, iim |
---|
67 | ecinsi(i) = vcov(i + ip1jmi1, l) * vcont(i + ip1jmi1, l) * aire(i + ip1jm) |
---|
68 | END DO |
---|
69 | ecinps = 0.5 * SUM(ecinsi(1:iim)) / apols |
---|
70 | DO ij = 1, iip1; ecin(ij + ip1jm, l) = ecinps; |
---|
71 | END DO |
---|
72 | END DO |
---|
73 | |
---|
74 | END SUBROUTINE enercin |
---|
75 | |
---|