Changeset 5136 for LMDZ6/branches/Amaury_dev/libf/dyn3d_common/enercin.F90
- Timestamp:
- Jul 28, 2024, 4:17:54 PM (3 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/Amaury_dev/libf/dyn3d_common/enercin.F90
r5134 r5136 1 SUBROUTINE enercin( vcov, ucov, vcont, ucont, ecin)1 SUBROUTINE enercin(vcov, ucov, vcont, ucont, ecin) 2 2 3 !------------------------------------------------------------------------------- 4 ! Authors: P. Le Van. 5 !------------------------------------------------------------------------------- 6 ! Purpose: Compute kinetic energy at sigma levels. 3 !------------------------------------------------------------------------------- 4 ! Authors: P. Le Van. 5 !------------------------------------------------------------------------------- 6 ! Purpose: Compute kinetic energy at sigma levels. 7 USE lmdz_comgeom 8 7 9 IMPLICIT NONE 8 10 INCLUDE "dimensions.h" 9 11 INCLUDE "paramet.h" 10 INCLUDE "comgeom.h" 11 !=============================================================================== 12 ! Arguments: 13 REAL, INTENT(IN) :: vcov (ip1jm, llm) 14 REAL, INTENT(IN) :: ucov (ip1jmp1,llm) 15 REAL, INTENT(IN) :: vcont (ip1jm, llm) 16 REAL, INTENT(IN) :: ucont (ip1jmp1,llm) 17 REAL, INTENT(OUT) :: ecin (ip1jmp1,llm) 18 !=============================================================================== 19 ! Notes: 20 ! . V 21 ! i,j-1 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 22 23 23 ! alpha4 . . alpha124 ! alpha4 . . alpha1 24 25 25 26 26 ! U . . P . U27 ! i-1,j i,j i,j27 ! U . . P . U 28 ! i-1,j i,j i,j 28 29 29 ! alpha3 . . alpha230 ! alpha3 . . alpha2 30 31 31 32 32 ! . V33 ! i,j33 ! . V 34 ! i,j 34 35 35 ! Kinetic energy at scalar point P(i,j) (excluding poles) is:36 ! Ecin = 0.5 * U(i-1,j)**2 *( alpha3 + alpha4 ) +37 ! 0.5 * U(i ,j)**2 *( alpha1 + alpha2 ) +38 ! 0.5 * V(i,j-1)**2 *( alpha1 + alpha4 ) +39 ! 0.5 * V(i, j)**2 *( alpha2 + alpha3 )40 !===============================================================================41 ! Local variables: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: 42 43 INTEGER :: l, ij, i 43 REAL 44 !===============================================================================45 DO l =1,llm46 DO ij = iip2, ip1jm - 147 ecin(ij +1,l)=0.5*(ucov(ij ,l)*ucont(ij ,l)*alpha3p4(ij +1) &48 + ucov(ij+1 ,l)*ucont(ij+1 ,l)*alpha1p2(ij +1) &49 + vcov(ij-iim,l)*vcont(ij-iim,l)*alpha1p4(ij +1) &50 + vcov(ij+1 ,l)*vcont(ij+1 ,l)*alpha2p3(ij +1))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)) 51 52 END DO 52 53 !--- Correction: ecin(1,j,l)= ecin(iip1,j,l) 53 DO ij=iip2,ip1jm,iip1; ecin(ij,l) = ecin(ij+iim,l); END DO 54 DO ij = iip2, ip1jm, iip1; ecin(ij, l) = ecin(ij + iim, l); 55 END DO 54 56 55 57 !--- North pole 56 DO i =1,iim57 ecinni(i) = vcov(i, l)*vcont(i,l)*aire(i)58 DO i = 1, iim 59 ecinni(i) = vcov(i, l) * vcont(i, l) * aire(i) 58 60 END DO 59 ecinpn = 0.5*SUM(ecinni(1:iim))/apoln 60 DO ij=1,iip1; ecin(ij,l)=ecinpn; END DO 61 ecinpn = 0.5 * SUM(ecinni(1:iim)) / apoln 62 DO ij = 1, iip1; ecin(ij, l) = ecinpn; 63 END DO 61 64 62 65 !--- South pole 63 DO i =1,iim64 ecinsi(i) = vcov(i +ip1jmi1,l)*vcont(i+ip1jmi1,l)*aire(i+ip1jm)66 DO i = 1, iim 67 ecinsi(i) = vcov(i + ip1jmi1, l) * vcont(i + ip1jmi1, l) * aire(i + ip1jm) 65 68 END DO 66 ecinps = 0.5*SUM(ecinsi(1:iim))/apols 67 DO ij=1,iip1; ecin(ij+ip1jm,l)=ecinps; END DO 69 ecinps = 0.5 * SUM(ecinsi(1:iim)) / apols 70 DO ij = 1, iip1; ecin(ij + ip1jm, l) = ecinps; 71 END DO 68 72 END DO 69 73
Note: See TracChangeset
for help on using the changeset viewer.