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

Last change on this file since 5116 was 5105, checked in by abarral, 2 months ago

Replace 1DUTILS.h by module lmdz_1dutils.f90
Replace 1DConv.h by module lmdz_old_1dconv.f90 (it's only used by old_* files)
Convert *.F to *.f90
Fix gradsdef.h formatting
Remove unnecessary "RETURN" at the end of functions/subroutines

  • 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  IMPLICIT NONE
19  !
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 )
26  !
27  INTEGER :: ijb,ije
28  EXTERNAL   SSUM
29  REAL :: SSUM
30  !
31  !
32  INCLUDE "comgeom.h"
33  !
34
35!$OMP DO SCHEDULE(STATIC,OMP_CHUNK)
36  DO l = 1,nbniv
37  !
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 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  END DO
48  !
49  !
50
51  ! ....  correction pour  convfl( 1,j,l)  ......
52  ! ....   convfl(1,j,l)= convfl(iip1,j,l) ...
53  !
54  !DIR$ IVDEP
55    DO ij = ijb,ije,iip1
56      convfl( ij,l ) = convfl( ij + iim,l )
57  END DO
58  !
59  ! ......  calcul aux poles  .......
60  !
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  END DO
82!$OMP END DO NOWAIT
83
84END SUBROUTINE convflu_loc
Note: See TracBrowser for help on using the repository browser.