source: LMDZ6/trunk/libf/dyn3dpar/convflu_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.1 KB
Line 
1      SUBROUTINE convflu_p( xflu,yflu,nbniv,convfl )
2c
3c  P. Le Van
4c
5c
6c    *******************************************************************
7c  ... calcule la (convergence horiz. * aire locale)du flux ayant pour
8c      composantes xflu et yflu ,variables extensives .  ......
9c    *******************************************************************
10c      xflu , yflu et nbniv sont des arguments d'entree pour le s-pg ..
11c      convfl                est  un argument de sortie pour le s-pg .
12c
13c     njxflu  est le nombre de lignes de latitude de xflu,
14c     ( = jjm ou jjp1 )
15c     nbniv   est le nombre de niveaux vert. de  xflu et de yflu .
16c
17      USE parallel_lmdz
18      IMPLICIT NONE
19c
20#include "dimensions.h"
21#include "paramet.h"
22      REAL       xflu,yflu,convfl,convpn,convps
23      INTEGER    l,ij,nbniv
24      DIMENSION  xflu( ip1jmp1,nbniv ),yflu( ip1jm,nbniv ) ,
25     *         convfl( ip1jmp1,nbniv )
26c
27      INTEGER ijb,ije
28      EXTERNAL   SSUM
29      REAL       SSUM
30c
31c
32#include "comgeom.h"
33c
34     
35c$OMP DO SCHEDULE(STATIC,OMP_CHUNK)         
36      DO 5 l = 1,nbniv
37c
38        ijb=ij_begin
39        ije=ij_end+iip1
40     
41        IF (pole_nord) ijb=ij_begin+iip1
42        IF (pole_sud)  ije=ij_end-iip1
43       
44        DO 2  ij = ijb , ije - 1
45          convfl(ij+1,l) = xflu(ij,l) - xflu(ij+ 1,l)   +
46     *                     yflu(ij +1,l ) - yflu( ij -iim,l )
47   2    CONTINUE
48c
49c
50
51c     ....  correction pour  convfl( 1,j,l)  ......
52c     ....   convfl(1,j,l)= convfl(iip1,j,l) ...
53c
54CDIR$ IVDEP
55        DO 3 ij = ijb,ije,iip1
56          convfl( ij,l ) = convfl( ij + iim,l )
57   3    CONTINUE
58c
59c     ......  calcul aux poles  .......
60c
61        IF (pole_nord) THEN
62     
63          convpn =   SSUM( iim, yflu(     1    ,l ),  1 )
64       
65          DO ij = 1,iip1
66            convfl(ij,l) = convpn * aire(ij) / apoln
67          ENDDO
68       
69        ENDIF
70     
71        IF (pole_sud) THEN
72       
73          convps = - SSUM( iim, yflu( ip1jm-iim,l ),  1 )
74       
75          DO ij = 1,iip1
76            convfl(ij+ip1jm,l) = convps * aire(ij+ ip1jm) / apols
77          ENDDO
78       
79        ENDIF
80     
81   5  CONTINUE
82c$OMP END DO NOWAIT   
83      RETURN
84      END
Note: See TracBrowser for help on using the repository browser.