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