/[lmdze]/trunk/dyn3d/enercin.f
ViewVC logotype

Contents of /trunk/dyn3d/enercin.f

Parent Directory Parent Directory | Revision Log Revision Log


Revision 265 - (show annotations)
Tue Mar 20 09:35:59 2018 UTC (6 years, 1 month ago) by guez
File size: 2443 byte(s)
Rename module dimens_m to dimensions.
1 module enercin_m
2
3 IMPLICIT NONE
4
5 contains
6
7 SUBROUTINE enercin(vcov, ucov, vcont, ucont, ecin)
8
9 ! From LMDZ4/libf/dyn3d/enercin.F, version 1.1.1.1 2004/05/19 12:53:06
10
11 USE dimensions
12 USE paramet_m
13 USE comgeom
14
15 ! =======================================================================
16
17 ! Auteur: P. Le Van
18 ! -------
19
20 ! Objet:
21 ! ------
22
23 ! *********************************************************************
24 ! .. calcul de l'energie cinetique aux niveaux s ......
25 ! *********************************************************************
26 ! vcov, vcont, ucov et ucont sont des arguments d'entree pour le s-pg .
27 ! ecin est un argument de sortie pour le s-pg
28
29 ! =======================================================================
30
31
32 REAL, INTENT (IN) :: vcov(ip1jm, llm), ucov(ip1jmp1, llm)
33 REAL vcont(ip1jm, llm), ucont(ip1jmp1, llm), ecin(ip1jmp1, llm)
34
35 REAL ecinni(iip1), ecinsi(iip1)
36
37 REAL ecinpn, ecinps
38 INTEGER l, ij, i
39
40 REAL ssum
41
42
43
44 ! . V
45 ! i,j-1
46
47 ! alpha4 . . alpha1
48
49
50 ! U . . P . U
51 ! i-1,j i,j i,j
52
53 ! alpha3 . . alpha2
54
55
56 ! . V
57 ! i,j
58
59
60 ! L'energie cinetique au point scalaire P(i,j) ,autre que les poles, est :
61 ! Ecin = 0.5 * U(i-1,j)**2 *( alpha3 + alpha4 ) +
62 ! 0.5 * U(i ,j)**2 *( alpha1 + alpha2 ) +
63 ! 0.5 * V(i,j-1)**2 *( alpha1 + alpha4 ) +
64 ! 0.5 * V(i, j)**2 *( alpha2 + alpha3 )
65
66
67 DO l = 1, llm
68
69 DO ij = iip2, ip1jm - 1
70 ecin(ij+1, l) = 0.5*(ucov(ij,l)*ucont(ij,l)*alpha3p4(ij+1)+ucov(ij+1,l) &
71 *ucont(ij+1,l)*alpha1p2(ij+1)+vcov(ij-iim,l)*vcont(ij-iim,l)*alpha1p4 &
72 (ij+1)+vcov(ij+1,l)*vcont(ij+1,l)*alpha2p3(ij+1))
73 END DO
74
75 ! ... correction pour ecin(1,j,l) ....
76 ! ... ecin(1,j,l)= ecin(iip1,j,l) ...
77
78 ! DIR$ IVDEP
79 DO ij = iip2, ip1jm, iip1
80 ecin(ij, l) = ecin(ij+iim, l)
81 END DO
82
83 ! calcul aux poles .......
84
85
86 DO i = 1, iim
87 ecinni(i) = vcov(i, l)*vcont(i, l)*aire(i)
88 ecinsi(i) = vcov(i+ip1jmi1, l)*vcont(i+ip1jmi1, l)*aire(i+ip1jm)
89 END DO
90
91 ecinpn = 0.5*ssum(iim, ecinni, 1)/apoln
92 ecinps = 0.5*ssum(iim, ecinsi, 1)/apols
93
94 DO ij = 1, iip1
95 ecin(ij, l) = ecinpn
96 ecin(ij+ip1jm, l) = ecinps
97 END DO
98
99 END DO
100
101 END SUBROUTINE enercin
102
103 end module enercin_m

  ViewVC Help
Powered by ViewVC 1.1.21