source: LMDZ5/trunk/libf/dyn3dpar/enercin.F @ 1907

Last change on this file since 1907 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.5 KB
Line 
1!
2! $Header$
3!
4      SUBROUTINE enercin ( vcov, ucov, vcont, ucont, ecin )
5      IMPLICIT NONE
6
7c=======================================================================
8c
9c   Auteur: P. Le Van
10c   -------
11c
12c   Objet:
13c   ------
14c
15c *********************************************************************
16c .. calcul de l'energie cinetique aux niveaux s  ......
17c *********************************************************************
18c  vcov, vcont, ucov et ucont sont des arguments d'entree pour le s-pg .
19c  ecin         est  un  argument de sortie pour le s-pg
20c
21c=======================================================================
22
23#include "dimensions.h"
24#include "paramet.h"
25#include "comgeom.h"
26
27      REAL vcov( ip1jm,llm ),vcont( ip1jm,llm ),
28     * ucov( ip1jmp1,llm ),ucont( ip1jmp1,llm ),ecin( ip1jmp1,llm )
29
30      REAL ecinni( iip1 ),ecinsi( iip1 )
31
32      REAL ecinpn, ecinps
33      INTEGER     l,ij,i
34
35      REAL        SSUM
36
37
38
39c                 . V
40c                i,j-1
41
42c      alpha4 .       . alpha1
43
44
45c        U .      . P     . U
46c       i-1,j    i,j      i,j
47
48c      alpha3 .       . alpha2
49
50
51c                 . V
52c                i,j
53
54c   
55c  L'energie cinetique au point scalaire P(i,j) ,autre que les poles, est :
56c       Ecin = 0.5 * U(i-1,j)**2 *( alpha3 + alpha4 )  +
57c              0.5 * U(i  ,j)**2 *( alpha1 + alpha2 )  +
58c              0.5 * V(i,j-1)**2 *( alpha1 + alpha4 )  +
59c              0.5 * V(i,  j)**2 *( alpha2 + alpha3 )
60
61
62      DO 5 l = 1,llm
63
64      DO 1  ij = iip2, ip1jm -1
65      ecin( ij+1, l )  =    0.5  *
66     * (   ucov( ij   ,l ) * ucont( ij   ,l ) * alpha3p4( ij +1 )   +
67     *     ucov( ij+1 ,l ) * ucont( ij+1 ,l ) * alpha1p2( ij +1 )   +
68     *     vcov(ij-iim,l ) * vcont(ij-iim,l ) * alpha1p4( ij +1 )   +
69     *     vcov( ij+ 1,l ) * vcont( ij+ 1,l ) * alpha2p3( ij +1 )   )
70   1  CONTINUE
71
72c    ... correction pour  ecin(1,j,l)  ....
73c    ...   ecin(1,j,l)= ecin(iip1,j,l) ...
74
75CDIR$ IVDEP
76      DO 2 ij = iip2, ip1jm, iip1
77      ecin( ij,l ) = ecin( ij + iim, l )
78   2  CONTINUE
79
80c     calcul aux poles  .......
81
82
83      DO 3 i = 1, iim
84      ecinni(i) = vcov(    i  ,  l) * vcont(    i    ,l) * aire(   i   )
85      ecinsi(i) = vcov(i+ip1jmi1,l) * vcont(i+ip1jmi1,l) * aire(i+ip1jm)
86   3  CONTINUE
87
88      ecinpn = 0.5 * SSUM( iim,ecinni,1 ) / apoln
89      ecinps = 0.5 * SSUM( iim,ecinsi,1 ) / apols
90
91      DO 4 ij = 1,iip1
92      ecin(   ij     , l ) = ecinpn
93      ecin( ij+ ip1jm, l ) = ecinps
94   4  CONTINUE
95
96   5  CONTINUE
97      RETURN
98      END
Note: See TracBrowser for help on using the repository browser.