source: LMDZ6/branches/Amaury_dev/libf/dyn3d_common/convflu.f90 @ 5136

Last change on this file since 5136 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
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.6 KB
Line 
1
2! $Header$
3
4SUBROUTINE convflu( xflu,yflu,nbniv,convfl )
5  !
6  !  P. Le Van
7  !
8  !
9  !    *******************************************************************
10  !  ... calcule la (convergence horiz. * aire locale)du flux ayant pour
11  !  composantes xflu et yflu ,variables extensives .  ......
12  !    *******************************************************************
13  !  xflu , yflu et nbniv sont des arguments d'entree pour le s-pg ..
14  !  convfl                est  un argument de sortie pour le s-pg .
15  !
16  ! njxflu  est le nombre de lignes de latitude de xflu,
17  ! ( = jjm ou jjp1 )
18  ! nbniv   est le nombre de niveaux vert. de  xflu et de yflu .
19  !
20  USE lmdz_ssum_scopy, ONLY: ssum
21  USE lmdz_comgeom
22
23  IMPLICIT NONE
24  !
25  INCLUDE "dimensions.h"
26  INCLUDE "paramet.h"
27  REAL :: xflu,yflu,convfl,convpn,convps
28  INTEGER :: l,ij,nbniv
29  DIMENSION  xflu( ip1jmp1,nbniv ),yflu( ip1jm,nbniv ) , &
30        convfl( ip1jmp1,nbniv )
31
32  !
33  DO l = 1,nbniv
34  !
35  DO ij = iip2, ip1jm - 1
36  convfl( ij + 1,l ) =  xflu(   ij,l ) - xflu( ij +  1,l )   + &
37        yflu(ij +1,l ) - yflu( ij -iim,l )
38  END DO
39  !
40  !
41
42  ! ....  correction pour  convfl( 1,j,l)  ......
43  ! ....   convfl(1,j,l)= convfl(iip1,j,l) ...
44  !
45  !DIR$ IVDEP
46  DO ij = iip2,ip1jm,iip1
47  convfl( ij,l ) = convfl( ij + iim,l )
48  END DO
49  !
50  ! ......  calcul aux poles  .......
51  !
52  convpn =   SSUM( iim, yflu(     1    ,l ),  1 )
53  convps = - SSUM( iim, yflu( ip1jm-iim,l ),  1 )
54  DO ij = 1,iip1
55  convfl(     ij   ,l ) = convpn * aire(   ij     ) / apoln
56  convfl( ij+ ip1jm,l ) = convps * aire( ij+ ip1jm) / apols
57  END DO
58  !
59  END DO
60  RETURN
61END SUBROUTINE convflu
Note: See TracBrowser for help on using the repository browser.