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

Contents of /trunk/dyn3d/Dissipation/divgrad2.f90

Parent Directory Parent Directory | Revision Log Revision Log


Revision 328 - (show annotations)
Thu Jun 13 14:40:06 2019 UTC (5 years ago) by guez
File size: 1321 byte(s)
Change all `.f` suffixes to `.f90`. (The opposite was done in revision
82.)  Because of change of philosopy in GNUmakefile: we already had a
rewritten rule for `.f`, so it does not make the makefile longer to
replace it by a rule for `.f90`. And it spares us options of
makedepf90 and of the compiler. Also we prepare the way for a simpler
`CMakeLists.txt`.

1 module divgrad2_m
2
3 IMPLICIT NONE
4
5 contains
6
7 SUBROUTINE divgrad2(klevel, h, deltapres, lh, divgra, cdivh)
8
9 ! From LMDZ4/libf/dyn3d/divgrad2.F, version 1.1.1.1, 2004/05/19 12:53:06
10 ! P. Le Van
11
12 ! Calcul de div(grad) de (pext * h)
13
14 USE comgeom, ONLY: cuvscvgam2, cvuscugam2, unsair_gam2, unsapolnga2, &
15 unsapolsga2
16 use dimensions, only: iim, jjm
17 use laplacien_gam_m, only: laplacien_gam
18 USE laplacien_m, ONLY: laplacien
19
20 INTEGER, intent(in):: klevel
21 REAL, intent(in), dimension(iim + 1, jjm + 1, klevel):: h, deltapres
22 integer, intent(in):: lh
23 REAL, intent(out):: divgra(iim + 1, jjm + 1, klevel)
24 real, intent(in):: cdivh
25
26 ! Variables locales
27 REAL sqrtps(iim + 1, jjm + 1, klevel)
28 INTEGER iter
29
30 !-----------------------------------------------------------------
31
32 divgra = h
33 CALL laplacien(klevel, divgra)
34 sqrtps = SQRT(deltapres)
35 divgra = divgra * sqrtps
36
37 ! Itération de l'opérateur laplacien_gam
38 DO iter = 1, lh - 2
39 CALL laplacien_gam(klevel, cuvscvgam2, cvuscugam2, unsair_gam2, &
40 unsapolnga2, unsapolsga2, divgra, divgra)
41 ENDDO
42
43 divgra = divgra * sqrtps
44 CALL laplacien(klevel, divgra)
45 divgra = (-1.)**lh * cdivh * divgra / deltapres
46
47 END SUBROUTINE divgrad2
48
49 end module divgrad2_m

  ViewVC Help
Powered by ViewVC 1.1.21