source: LMDZ6/trunk/libf/dyn3dpar/enercin_p.F @ 3981

Last change on this file since 3981 was 1907, checked in by lguez, 10 years ago

Added a copyright property to every file of the distribution, except
for the fcm files (which have their own copyright). Use svn propget on
a file to see the copyright. For instance:

$ svn propget copyright libf/phylmd/physiq.F90
Name of program: LMDZ
Creation date: 1984
Version: LMDZ5
License: CeCILL version 2
Holder: Laboratoire de m\'et\'eorologie dynamique, CNRS, UMR 8539
See the license file in the root directory

Also added the files defining the CeCILL version 2 license, in French
and English, at the top of the LMDZ tree.

  • Property copyright set to
    Name of program: LMDZ
    Creation date: 1984
    Version: LMDZ5
    License: CeCILL version 2
    Holder: Laboratoire de m\'et\'eorologie dynamique, CNRS, UMR 8539
    See the license file in the root directory
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.9 KB
Line 
1      SUBROUTINE enercin_p ( vcov, ucov, vcont, ucont, ecin )
2      USE parallel_lmdz
3      IMPLICIT NONE
4
5c=======================================================================
6c
7c   Auteur: P. Le Van
8c   -------
9c
10c   Objet:
11c   ------
12c
13c *********************************************************************
14c .. calcul de l'energie cinetique aux niveaux s  ......
15c *********************************************************************
16c  vcov, vcont, ucov et ucont sont des arguments d'entree pour le s-pg .
17c  ecin         est  un  argument de sortie pour le s-pg
18c
19c=======================================================================
20
21#include "dimensions.h"
22#include "paramet.h"
23#include "comgeom.h"
24
25      REAL vcov( ip1jm,llm ),vcont( ip1jm,llm ),
26     * ucov( ip1jmp1,llm ),ucont( ip1jmp1,llm ),ecin( ip1jmp1,llm )
27
28      REAL ecinni( iip1 ),ecinsi( iip1 )
29
30      REAL ecinpn, ecinps
31      INTEGER     l,ij,i,ijb,ije
32
33      EXTERNAL    SSUM
34      REAL        SSUM
35
36
37
38c                 . V
39c                i,j-1
40
41c      alpha4 .       . alpha1
42
43
44c        U .      . P     . U
45c       i-1,j    i,j      i,j
46
47c      alpha3 .       . alpha2
48
49
50c                 . V
51c                i,j
52
53c   
54c  L'energie cinetique au point scalaire P(i,j) ,autre que les poles, est :
55c       Ecin = 0.5 * U(i-1,j)**2 *( alpha3 + alpha4 )  +
56c              0.5 * U(i  ,j)**2 *( alpha1 + alpha2 )  +
57c              0.5 * V(i,j-1)**2 *( alpha1 + alpha4 )  +
58c              0.5 * V(i,  j)**2 *( alpha2 + alpha3 )
59
60c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
61      DO 5 l = 1,llm
62     
63      ijb=ij_begin
64      ije=ij_end+iip1
65     
66      IF (pole_nord) ijb=ij_begin+iip1
67      IF (pole_sud)  ije=ij_end-iip1
68     
69      DO 1  ij = ijb, ije -1
70      ecin( ij+1, l )  =    0.5  *
71     * (   ucov( ij   ,l ) * ucont( ij   ,l ) * alpha3p4( ij +1 )   +
72     *     ucov( ij+1 ,l ) * ucont( ij+1 ,l ) * alpha1p2( ij +1 )   +
73     *     vcov(ij-iim,l ) * vcont(ij-iim,l ) * alpha1p4( ij +1 )   +
74     *     vcov( ij+ 1,l ) * vcont( ij+ 1,l ) * alpha2p3( ij +1 )   )
75   1  CONTINUE
76
77c    ... correction pour  ecin(1,j,l)  ....
78c    ...   ecin(1,j,l)= ecin(iip1,j,l) ...
79
80CDIR$ IVDEP
81      DO 2 ij = ijb, ije, iip1
82      ecin( ij,l ) = ecin( ij + iim, l )
83   2  CONTINUE
84
85c     calcul aux poles  .......
86
87      IF (pole_nord) THEN
88   
89        DO  i = 1, iim
90         ecinni(i) = vcov(    i  ,  l) *
91     *               vcont(    i    ,l) * aire(   i   )
92        ENDDO
93
94        ecinpn = 0.5 * SSUM( iim,ecinni,1 ) / apoln
95
96        DO ij = 1,iip1
97          ecin(   ij     , l ) = ecinpn
98        ENDDO
99   
100      ENDIF
101
102      IF (pole_sud) THEN
103   
104        DO  i = 1, iim
105         ecinsi(i) = vcov(i+ip1jmi1,l)*
106     *               vcont(i+ip1jmi1,l) * aire(i+ip1jm)
107        ENDDO
108
109        ecinps = 0.5 * SSUM( iim,ecinsi,1 ) / apols
110
111        DO ij = 1,iip1
112          ecin( ij+ ip1jm, l ) = ecinps
113        ENDDO
114   
115      ENDIF
116
117     
118   5  CONTINUE
119c$OMP END DO NOWAIT
120      RETURN
121      END
Note: See TracBrowser for help on using the repository browser.