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

Contents of /trunk/Sources/dyn3d/enercin.f

Parent Directory Parent Directory | Revision Log Revision Log


Revision 81 - (show annotations)
Wed Mar 5 14:38:41 2014 UTC (10 years, 2 months ago) by guez
Original Path: trunk/dyn3d/enercin.f90
File size: 2269 byte(s)
 Converted to free source form files which were still in fixed source
form. The conversion was done using the polish mode of the NAG Fortran
Compiler.

In addition to converting to free source form, the processing of the
files also:

-- indented the code (including comments);

-- set Fortran keywords to uppercase, and set all other identifiers
to lower case;

-- added qualifiers to end statements (for example "end subroutine
conflx", instead of "end");

-- changed the terminating statements of all DO loops so that each
loop ends with an ENDDO statement (instead of a labeled continue).

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

  ViewVC Help
Powered by ViewVC 1.1.21