[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 | |
---|
[2336] | 9 | IMPLICIT NONE |
---|
[5134] | 10 | INCLUDE "dimensions.h" |
---|
| 11 | INCLUDE "paramet.h" |
---|
[5136] | 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 |
---|
[5099] | 23 | |
---|
[5136] | 24 | ! alpha4 . . alpha1 |
---|
[5099] | 25 | |
---|
| 26 | |
---|
[5136] | 27 | ! U . . P . U |
---|
| 28 | ! i-1,j i,j i,j |
---|
[5099] | 29 | |
---|
[5136] | 30 | ! alpha3 . . alpha2 |
---|
[5099] | 31 | |
---|
| 32 | |
---|
[5136] | 33 | ! . V |
---|
| 34 | ! i,j |
---|
[5099] | 35 | |
---|
[5136] | 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: |
---|
[2336] | 43 | INTEGER :: l, ij, i |
---|
[5136] | 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)) |
---|
[2336] | 52 | END DO |
---|
| 53 | !--- Correction: ecin(1,j,l)= ecin(iip1,j,l) |
---|
[5136] | 54 | DO ij = iip2, ip1jm, iip1; ecin(ij, l) = ecin(ij + iim, l); |
---|
| 55 | END DO |
---|
[524] | 56 | |
---|
[2336] | 57 | !--- North pole |
---|
[5136] | 58 | DO i = 1, iim |
---|
| 59 | ecinni(i) = vcov(i, l) * vcont(i, l) * aire(i) |
---|
[2336] | 60 | END DO |
---|
[5136] | 61 | ecinpn = 0.5 * SUM(ecinni(1:iim)) / apoln |
---|
| 62 | DO ij = 1, iip1; ecin(ij, l) = ecinpn; |
---|
| 63 | END DO |
---|
[524] | 64 | |
---|
[2336] | 65 | !--- South pole |
---|
[5136] | 66 | DO i = 1, iim |
---|
| 67 | ecinsi(i) = vcov(i + ip1jmi1, l) * vcont(i + ip1jmi1, l) * aire(i + ip1jm) |
---|
[2336] | 68 | END DO |
---|
[5136] | 69 | ecinps = 0.5 * SUM(ecinsi(1:iim)) / apols |
---|
| 70 | DO ij = 1, iip1; ecin(ij + ip1jm, l) = ecinps; |
---|
| 71 | END DO |
---|
[2336] | 72 | END DO |
---|
[524] | 73 | |
---|
[2336] | 74 | END SUBROUTINE enercin |
---|
[524] | 75 | |
---|