source: LMDZ5/trunk/libf/dyn3dpar/divergst.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: 1.5 KB
Line 
1!
2! $Header$
3!
4      SUBROUTINE divergst(klevel,x,y,div)
5      IMPLICIT NONE
6c
7c     P. Le Van
8c
9c  ******************************************************************
10c  ... calcule la divergence a tous les niveaux d'1 vecteur de compos. x et y...
11c           x et y  etant des composantes contravariantes   ...
12c  ****************************************************************
13c      x  et  y  sont des arguments  d'entree pour le s-prog
14c        div      est  un argument  de sortie pour le s-prog
15c
16c
17c   -------------------------------------------------------------------
18c
19#include "dimensions.h"
20#include "paramet.h"
21#include "comgeom.h"
22
23      INTEGER klevel
24      REAL x( ip1jmp1,klevel ),y( ip1jm,klevel ),div( ip1jmp1,klevel )
25      INTEGER ij,l,i
26      REAL aiy1( iip1 ) , aiy2( iip1 )
27      REAL sumypn,sumyps
28
29      REAL SSUM
30c
31c
32      DO 10 l = 1,klevel
33c
34      DO 1 ij = iip2, ip1jm - 1
35      div( ij + 1, l ) = x(ij+1,l) - x(ij,l)+ y(ij-iim,l)-y(ij+1,l)
36   1  CONTINUE
37c
38c     ....  correction pour  div( 1,j,l)  ......
39c     ....   div(1,j,l)= div(iip1,j,l) ....
40c
41CDIR$ IVDEP
42      DO 3 ij = iip2,ip1jm,iip1
43      div( ij,l ) = div( ij + iim,l )
44   3  CONTINUE
45c
46c     ....  calcul  aux poles  .....
47c
48c
49      DO 5 i  = 1,iim
50      aiy1(i)= y(i,l)
51      aiy2(i)= y(i+ip1jmi1,l)
52   5  CONTINUE
53      sumypn = SSUM ( iim,aiy1,1 )
54      sumyps = SSUM ( iim,aiy2,1 )
55      DO 7 i = 1,iip1
56      div(     i    , l ) = - sumypn/iim
57      div( i + ip1jm, l ) =   sumyps/iim
58   7  CONTINUE
59c
60  10  CONTINUE
61      RETURN
62      END
Note: See TracBrowser for help on using the repository browser.