/[lmdze]/trunk/Sources/dyn3d/Dissipation/gradiv2.f
ViewVC logotype

Annotation of /trunk/Sources/dyn3d/Dissipation/gradiv2.f

Parent Directory Parent Directory | Revision Log Revision Log


Revision 54 - (hide annotations)
Tue Dec 6 15:07:04 2011 UTC (12 years, 5 months ago) by guez
Original Path: trunk/libf/dyn3d/gradiv2.f90
File size: 1699 byte(s)
Removed Numerical Recipes procedure "ran1". Replaced calls to "ran1"
in "inidissip" by calls to intrinsic procedures.

Split file "interface_surf.f90" into a file with a module containing
only variables, "interface_surf", and single-procedure files. Gathered
files into directory "Interface_surf".

Added argument "cdivu" to "gradiv" and "gradiv2", "cdivh" to
"divgrad2" and "divgrad", and "crot" to "nxgraro2" and
"nxgrarot". "dissip" now uses variables "cdivu", "cdivh" and "crot"
from module "inidissip_m", so it can pass them to "gradiv2",
etc. Thanks to this modification, we avoid a circular dependency
betwwen "inidissip.f90" and "gradiv2.f90", etc. The value -1. used by
"gradiv2", for instance, during computation of eigenvalues is not the
value "cdivu" computed by "inidissip".

Extracted procedure "start_inter_3d" from module "startdyn", to its
own module.

In "inidissip", unrolled loop on "ii". I find it clearer now.

Moved variables "matriceun", "matriceus", "matricevn", "matricevs",
"matrinvn" and "matrinvs" from module "parafilt" to module
"inifilr_m". Moved variables "jfiltnu", "jfiltnv", "jfiltsu",
"jfiltsv" from module "coefils" to module "inifilr_m".

1 guez 54 module gradiv2_m
2 guez 3
3 guez 54 IMPLICIT NONE
4 guez 3
5 guez 54 contains
6 guez 3
7 guez 54 SUBROUTINE gradiv2(klevel, xcov, ycov, ld, gdx, gdy, cdivu)
8 guez 3
9 guez 54 ! From LMDZ4/libf/dyn3d/gradiv2.F, version 1.1.1.1 2004/05/19 12:53:07
10 guez 3
11 guez 54 ! P. Le Van
12     ! calcul de grad div du vecteur v
13     ! xcov et ycov etant les composantes covariantes de v
14     ! xcont, ycont et ld sont des arguments d'entree pour le sous-programme
15     ! gdx et gdy sont des arguments de sortie pour le sous-programme
16 guez 3
17 guez 54 use dimens_m
18     use paramet_m
19     use comgeom
20     use filtreg_m, only: filtreg
21 guez 3
22 guez 54 ! variables en arguments
23 guez 3
24 guez 54 INTEGER klevel
25     REAL xcov( ip1jmp1,klevel), ycov( ip1jm,klevel)
26     integer, intent(in):: ld
27     REAL gdx( ip1jmp1,klevel), gdy( ip1jm,klevel)
28     real, intent(in):: cdivu
29 guez 3
30 guez 54 ! variables locales
31 guez 3
32 guez 54 REAL div(ip1jmp1,llm)
33     REAL nugrads
34     INTEGER l,ij,iter
35 guez 3
36 guez 54 !--------------------------------------------------------------
37    
38     CALL SCOPY( ip1jmp1 * klevel, xcov, 1, gdx, 1)
39     CALL SCOPY( ip1jm * klevel, ycov, 1, gdy, 1)
40    
41     CALL divergf( klevel, gdx, gdy, div)
42    
43     IF( ld.GT.1) THEN
44     CALL laplacien ( klevel, div, div)
45    
46     ! Iteration de l'operateur laplacien_gam
47     DO iter = 1, ld -2
48     CALL laplacien_gam ( klevel,cuvscvgam1,cvuscugam1,unsair_gam1, &
49     unsapolnga1, unsapolsga1, div, div)
50 guez 3 ENDDO
51 guez 54 ENDIF
52    
53     CALL filtreg( div, jjp1, klevel, 2, 1, .TRUE., 1)
54     CALL grad ( klevel, div, gdx, gdy)
55     nugrads = (-1.)**ld * cdivu
56    
57     DO l = 1, klevel
58     DO ij = 1, ip1jmp1
59     gdx( ij,l) = gdx( ij,l) * nugrads
60     ENDDO
61     DO ij = 1, ip1jm
62     gdy( ij,l) = gdy( ij,l) * nugrads
63     ENDDO
64     ENDDO
65    
66     END SUBROUTINE gradiv2
67    
68     end module gradiv2_m

  ViewVC Help
Powered by ViewVC 1.1.21