/[lmdze]/trunk/dyn3d/Dissipation/divgrad2.f
ViewVC logotype

Annotation of /trunk/dyn3d/Dissipation/divgrad2.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/divgrad2.f
File size: 2138 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 3 !
2     ! $Header: /home/cvsroot/LMDZ4/libf/dyn3d/divgrad2.F,v 1.1.1.1 2004/05/19 12:53:06 lmdzadmin Exp $
3     !
4 guez 54 SUBROUTINE divgrad2 ( klevel, h, deltapres, lh, divgra, cdivh )
5 guez 3 c
6     c P. Le Van
7     c
8     c ***************************************************************
9     c
10     c ..... calcul de (div( grad )) de ( pext * h ) .....
11     c ****************************************************************
12     c h ,klevel,lh et pext sont des arguments d'entree pour le s-prg
13     c divgra est un argument de sortie pour le s-prg
14     c
15     use dimens_m
16     use paramet_m
17     use comgeom
18     IMPLICIT NONE
19     c
20    
21     c ....... variables en arguments .......
22     c
23     INTEGER klevel
24     REAL h( ip1jmp1,klevel ), deltapres( ip1jmp1,klevel )
25     REAL divgra( ip1jmp1,klevel)
26 guez 54 real, intent(in):: cdivh
27 guez 3 c
28     c ....... variables locales ..........
29     c
30     REAL signe, nudivgrs, sqrtps( ip1jmp1,llm )
31 guez 26 INTEGER l,ij,iter
32     integer, intent(in):: lh
33 guez 3 c ...................................................................
34    
35     c
36     signe = (-1.)**lh
37     nudivgrs = signe * cdivh
38    
39     CALL SCOPY ( ip1jmp1 * klevel, h, 1, divgra, 1 )
40    
41     c
42     CALL laplacien( klevel, divgra, divgra )
43    
44     DO l = 1, klevel
45     DO ij = 1, ip1jmp1
46     sqrtps( ij,l ) = SQRT( deltapres(ij,l) )
47     ENDDO
48     ENDDO
49     c
50     DO l = 1, klevel
51     DO ij = 1, ip1jmp1
52     divgra(ij,l) = divgra(ij,l) * sqrtps(ij,l)
53     ENDDO
54     ENDDO
55    
56     c ........ Iteration de l'operateur laplacien_gam ........
57     c
58     DO iter = 1, lh - 2
59     CALL laplacien_gam ( klevel,cuvscvgam2,cvuscugam2,unsair_gam2,
60     * unsapolnga2, unsapolsga2, divgra, divgra )
61     ENDDO
62     c
63     c ...............................................................
64    
65     DO l = 1, klevel
66     DO ij = 1, ip1jmp1
67     divgra(ij,l) = divgra(ij,l) * sqrtps(ij,l)
68     ENDDO
69     ENDDO
70     c
71     CALL laplacien ( klevel, divgra, divgra )
72     c
73     DO l = 1,klevel
74     DO ij = 1,ip1jmp1
75     divgra(ij,l) = nudivgrs * divgra(ij,l) / deltapres(ij,l)
76     ENDDO
77     ENDDO
78    
79     RETURN
80     END

  ViewVC Help
Powered by ViewVC 1.1.21