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