source: LMDZ5/trunk/libf/convflu_loc.F @ 1630

Last change on this file since 1630 was 1630, checked in by Laurent Fairhead, 12 years ago

Importation initiale du répertoire dyn3dmem


Initial import of dyn3dmem directory

File size: 2.1 KB
Line 
1      SUBROUTINE convflu_loc( 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
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( ijb_u:ije_u,nbniv ),yflu( ijb_v:ije_v,nbniv ) ,
25     *         convfl( ijb_u:ije_u,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.