source: LMDZ6/branches/Amaury_dev/libf/dyn3dmem/convflu_loc.f90 @ 5139

Last change on this file since 5139 was 5136, checked in by abarral, 8 weeks ago

Put comgeom.h, comgeom2.h into modules

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