/[lmdze]/trunk/dyn3d/divergf.f
ViewVC logotype

Annotation of /trunk/dyn3d/divergf.f

Parent Directory Parent Directory | Revision Log Revision Log


Revision 27 - (hide annotations)
Thu Mar 25 14:29:07 2010 UTC (14 years, 2 months ago) by guez
Original Path: trunk/libf/dyn3d/divergf.f
File size: 2474 byte(s)
"dyn3d" and "filtrez" do not contain any included file so make rules
have been updated.

"comdissip.f90" was useless, removed it.

"dynredem0" wrote undefined value in "controle(31)", that was
overwritten by "dynredem1". Now "dynredem0" just writes 0 to
"controle(31)".

Removed arguments of "inidissip". "inidissip" now accesses the
variables by use association.

In program "etat0_lim", "itaufin" is not defined so "dynredem1" wrote
undefined value to "controle(31)". Added argument "itau" of
"dynredem1" to correct that.

"itaufin" does not need to be a module variable (of "temps"), made it
a local variable of "leapfrog".

Removed calls to "diagedyn" from "leapfrog".

1 guez 3 !
2     ! $Header: /home/cvsroot/LMDZ4/libf/dyn3d/divergf.F,v 1.1.1.1 2004/05/19 12:53:05 lmdzadmin Exp $
3     !
4     SUBROUTINE divergf(klevel,x,y,div)
5     c
6     c P. Le Van
7     c
8     c *********************************************************************
9     c ... calcule la divergence a tous les niveaux d'1 vecteur de compos.
10     c x et y...
11     c x et y etant des composantes covariantes ...
12     c *********************************************************************
13     use dimens_m
14     use paramet_m
15     use comgeom
16 guez 27 use filtreg_m, only: filtreg
17 guez 3 IMPLICIT NONE
18     c
19     c x et y sont des arguments d'entree pour le s-prog
20     c div est un argument de sortie pour le s-prog
21     c
22     c
23     c ---------------------------------------------------------------------
24     c
25     c ATTENTION : pendant ce s-pg , ne pas toucher au COMMON/scratch/ .
26     c
27     c ---------------------------------------------------------------------
28     c
29     c .......... variables en arguments ...................
30     c
31     INTEGER klevel
32     REAL x( ip1jmp1,klevel ),y( ip1jm,klevel ),div( ip1jmp1,klevel )
33     INTEGER l,ij
34     c
35     c ............... variables locales .........................
36    
37     REAL aiy1( iip1 ) , aiy2( iip1 )
38     REAL sumypn,sumyps
39     c ...................................................................
40     c
41     REAL SSUM
42     c
43     c
44     DO 10 l = 1,klevel
45     c
46     DO ij = iip2, ip1jm - 1
47     div( ij + 1, l ) =
48     * cvusurcu( ij+1 ) * x( ij+1,l ) - cvusurcu( ij ) * x( ij , l) +
49     * cuvsurcv(ij-iim) * y(ij-iim,l) - cuvsurcv(ij+1) * y(ij+1,l)
50     ENDDO
51     c
52     c .... correction pour div( 1,j,l) ......
53     c .... div(1,j,l)= div(iip1,j,l) ....
54     c
55     CDIR$ IVDEP
56     DO ij = iip2,ip1jm,iip1
57     div( ij,l ) = div( ij + iim,l )
58     ENDDO
59     c
60     c .... calcul aux poles .....
61     c
62     DO ij = 1,iim
63     aiy1(ij) = cuvsurcv( ij ) * y( ij , l )
64     aiy2(ij) = cuvsurcv( ij+ ip1jmi1 ) * y( ij+ ip1jmi1, l )
65     ENDDO
66     sumypn = SSUM ( iim,aiy1,1 ) / apoln
67     sumyps = SSUM ( iim,aiy2,1 ) / apols
68     c
69     DO ij = 1,iip1
70     div( ij , l ) = - sumypn
71     div( ij + ip1jm, l ) = sumyps
72     ENDDO
73     10 CONTINUE
74     c
75    
76     CALL filtreg( div, jjp1, klevel, 2, 2, .TRUE., 1 )
77    
78     c
79     DO l = 1, klevel
80     DO ij = iip2,ip1jm
81     div(ij,l) = div(ij,l) * unsaire(ij)
82     ENDDO
83     ENDDO
84     c
85     RETURN
86     END

  ViewVC Help
Powered by ViewVC 1.1.21