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